mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-13 06:55:59 +00:00
47 lines
1.4 KiB
HTML
47 lines
1.4 KiB
HTML
{% extends base_template %}
|
|
{% block title %}添加用户{% endblock %}
|
|
{% block nav_useradmin_class %}class="cur"{% endblock %}
|
|
{% block main_panel %}
|
|
<div class="narrow-panel">
|
|
<h3>添加用户</h3>
|
|
<form action="" method="post">
|
|
<label for="id_email">邮箱:</label>
|
|
{{ form.email }}
|
|
<label for="id_password1">密码:</label>
|
|
{{ form.password1 }}
|
|
<label for="id_password2">确认密码:</label>
|
|
{{ form.password2 }}
|
|
|
|
{{ form.email.errors }}
|
|
{{ form.password1.errors }}
|
|
{{ form.password2.errors }}
|
|
<p class="error hide" id="error"></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="email"]').attr('value'))) {
|
|
$('#error').html('请输入邮箱。').removeClass('hide');
|
|
return false;
|
|
}
|
|
if (!$.trim($('input[name="password1"]').attr('value'))) {
|
|
$('#error').html('请输入密码。').removeClass('hide');
|
|
return false;
|
|
}
|
|
if (!$.trim($('input[name="password2"]').attr('value'))) {
|
|
$('#error').html('请确认密码。').removeClass('hide');
|
|
return false;
|
|
}
|
|
if ($.trim($('input[name="password1"]').attr('value')) != $.trim($('input[name="password2"]').attr('value'))) {
|
|
$('#error').html('两次输入的密码不一致。').removeClass('hide');
|
|
return false;
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %}
|