gocron/templates/user/editPassword.html

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" . }}}