gocron/templates/user/editPassword.html

73 lines
2.8 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 class="small input" type="password" name="old_password" placeholder="原密码">
</div>
</div>
<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', fields, function(code, message) {
swal("操作成功", '', 'success');
location.href = "/task"
});
return false;
},
fields: {
oldPassword: {
identifier : 'old_password',
rules: [
{
type : 'empty',
prompt : ''
}
]
},
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" . }}}