mirror of https://github.com/ouqiang/gocron
58 lines
2.2 KiB
Go
58 lines
2.2 KiB
Go
{{{ template "common/header" . }}}
|
|
<div class="ui small modal">
|
|
<div class="header">修改密码</div>
|
|
<div class="content">
|
|
<form class="ui form">
|
|
<div class="two fields">
|
|
<div class="field">
|
|
<label>新密码</label>
|
|
<input type="password" name="new_password" placeholder="新密码">
|
|
</div>
|
|
</div>
|
|
<div class="two fields">
|
|
<div class="field">
|
|
<label>确认新密码</label>
|
|
<input type="password" name="confirm_new_password" placeholder="确认新密码">
|
|
</div>
|
|
</div>
|
|
<button class="ui button primary button" >确定</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$('.ui.modal').modal('setting', 'closable', false).modal('show');
|
|
$('.ui.form').form(
|
|
{
|
|
onSuccess: function(event, fields) {
|
|
util.post('/user/editPassword/{{{.Id}}}', fields, function(code, message) {
|
|
swal("操作成功", '修改成功', 'success');
|
|
location.href = "/user"
|
|
});
|
|
|
|
return false;
|
|
},
|
|
fields: {
|
|
newPassword: {
|
|
identifier : 'new_password',
|
|
rules: [
|
|
{
|
|
type : 'empty',
|
|
prompt : '请输入新密码'
|
|
}
|
|
]
|
|
},
|
|
confirmNewPassword: {
|
|
identifier : 'confirm_new_password',
|
|
rules: [
|
|
{
|
|
type : 'match[new_password]',
|
|
prompt : '两次输入密码不匹配'
|
|
}
|
|
]
|
|
}
|
|
},
|
|
inline : true
|
|
});
|
|
</script>
|
|
{{{ template "common/footer" . }}} |