mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-25 02:00:06 +00:00
47 lines
1.6 KiB
HTML
47 lines
1.6 KiB
HTML
{% extends "accounts.html" %}
|
|
{% block title %}密码修改{% endblock %}
|
|
|
|
{% block main_panel %}
|
|
<div class="narrow-panel">
|
|
<h2>密码修改</h2>
|
|
<form action="" method="post">
|
|
<label for="id_old_password">当前密码:</label>
|
|
{{ form.old_password }}
|
|
<label for="id_new_password1">新密码:</label>
|
|
{{ form.new_password1 }}
|
|
<label for="id_new_password2">新密码确认:</label>
|
|
{{ form.new_password2 }}
|
|
|
|
{{ form.old_password.errors }}
|
|
{{ form.new_password1.errors }}
|
|
{{ form.new_password2.errors }}
|
|
<p class="error hide"></p>
|
|
|
|
<input type="submit" value="提交" class="submit" />
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block extra_script %}
|
|
<script type="text/javascript">
|
|
$('input[type="submit"]').click(function(){
|
|
if (!$.trim($('input[name="old_password"]').attr('value'))) {
|
|
$('.error').removeClass('hide').html('请输入当前密码。');
|
|
return false;
|
|
}
|
|
if (!$.trim($('input[name="new_password1"]').attr('value'))) {
|
|
$('.error').removeClass('hide').html('请输入新密码。');
|
|
return false;
|
|
}
|
|
if (!$.trim($('input[name="new_password2"]').attr('value'))) {
|
|
$('.error').removeClass('hide').html('请确认新密码。');
|
|
return false;
|
|
}
|
|
if ($.trim($('input[name="new_password1"]').attr('value')) != $.trim($('input[name="new_password2"]').attr('value'))) {
|
|
$('.error').removeClass('hide').html('两次输入的新密码不一致。');
|
|
return false;
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %}
|