1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-30 04:25:47 +00:00

Fixed password length bug

This commit is contained in:
zhengxie 2013-03-29 16:47:08 +08:00
parent 08fc2f50d4
commit 1f0813f15e
3 changed files with 4 additions and 4 deletions

View File

@ -167,7 +167,7 @@
<h3>{% trans 'Library' %} <span class="op-target"></span> {% trans 'is encrypted' %}</h3>
<input type="hidden" name="repo_id" value="" />
<label>{% trans 'Password' %}</label><br />
<input type="password" name="password" maxlength="15" class="long-input" />
<input type="password" name="password" maxlength="30" class="long-input" />
<p class="tip">{% trans 'The password will be kept in the server for only 1 hour.' %}</p>
<p class="error"></p>
<input type="submit" class="submit" value="{% trans 'Submit' %}" />

View File

@ -367,8 +367,8 @@ $('#repo-decrypt-form').submit(function() {
var err = $(this).find('.error');
if (!pwd) {
err.html('{% trans "Password is required." %}');
} else if (pwd.length < 3 || pwd.length > 15) {
err.html('{% trans "Password should be 3 to 15 characters." %}');
} else if (pwd.length < 3 || pwd.length > 30) {
err.html('{% trans "Password should be 3 to 30 characters." %}');
} else {
$.ajax({
url: '{% url 'repo_set_password' %}',

View File

@ -8,7 +8,7 @@
<h3>{% trans 'Library' %} <span class="op-target"></span> {% trans 'is encrypted' %}</h3>
<input type="hidden" name="repo_id" value="" />
<label>{% trans 'Password' %}</label><br />
<input type="password" name="password" maxlength="15" class="long-input" />
<input type="password" name="password" maxlength="30" class="long-input" />
<p class="tip">{% trans 'The password will be kept in the server for only 1 hour.' %}</p>
<p class="error"></p>
<input type="submit" class="submit" value="{% trans 'Submit' %}" />