mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-30 13:23:14 +00:00
Fixed password length bug
This commit is contained in:
parent
08fc2f50d4
commit
1f0813f15e
@ -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' %}" />
|
||||
|
@ -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' %}',
|
||||
|
@ -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' %}" />
|
||||
|
Loading…
Reference in New Issue
Block a user