gocron/templates/user/editPassword.html

58 lines
2.2 KiB
Go
Raw Normal View History

2017-04-30 12:50:09 +00:00
{{{ 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>
2017-10-01 13:49:46 +00:00
<button class="ui button primary button" ></button>
2017-04-30 12:50:09 +00:00
</form>
</div>
</div>
<script type="text/javascript">
$('.ui.modal').modal('setting', 'closable', false).modal('show');
$('.ui.form').form(
{
onSuccess: function(event, fields) {
2017-10-01 13:49:46 +00:00
util.post('/user/editPassword/{{{.Id}}}', fields, function(code, message) {
2017-04-30 12:50:09 +00:00
swal("操作成功", '', 'success');
2017-10-01 13:49:46 +00:00
location.href = "/user"
2017-04-30 12:50:09 +00:00
});
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" . }}}