91 lines
3.6 KiB
HTML
91 lines
3.6 KiB
HTML
<!-- 个人资料 -->
|
|
<div class="container-fluid">
|
|
<div class="info-center">
|
|
<!--title-->
|
|
<div class="info-center">
|
|
<div class="page-header">
|
|
<div class="pull-left">
|
|
<h4>{{.pageTitle}}</h4>
|
|
</div>
|
|
<div class="pull-right">
|
|
<!-- <button type="button" class="btn btn-mystyle btn-sm refresh">刷新</button>
|
|
<button type="button" class="btn btn-mystyle btn-sm reback">返回</button> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!--content-list-->
|
|
<div class="content-list">
|
|
<form action="{{urlfor "MainController.Profile"}}" method="post" class="form-horizontal">
|
|
<div class="form-group" style="margin-top: 15px">
|
|
<label class="col-sm-3 control-label" for="user_name">用户名</label>
|
|
<div class="col-sm-3" >
|
|
<input type="text" class="form-control input-sm" placeholder="" name="user_name" value="{{.user.UserName}}" disabled="" />
|
|
</div>
|
|
<div class="col-sm-6" style="padding-top:5px;">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" style="margin-top: 15px">
|
|
<label class="col-sm-3 control-label" for="email">Email</label>
|
|
<div class="col-sm-3" >
|
|
<input type="text" class="form-control input-sm" placeholder="" name="email" value="{{.user.Email}}" />
|
|
</div>
|
|
<div class="col-sm-6" style="padding-top:5px;">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" style="margin-top: 15px">
|
|
<label class="col-sm-3 control-label" for="password1">新密码</label>
|
|
<div class="col-sm-3" >
|
|
<input type="text" class="form-control input-sm" placeholder="" name="password1" value="" />
|
|
</div>
|
|
<div class="col-sm-6" style="padding-top:5px;">
|
|
<i>不修改密码请留空</i>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" style="margin-top: 15px">
|
|
<label class="col-sm-3 control-label" for="password2">确认密码</label>
|
|
<div class="col-sm-3" >
|
|
<input type="text" class="form-control input-sm" placeholder="" name="password2" value="" />
|
|
</div>
|
|
<div class="col-sm-6" style="padding-top:5px;">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<br />
|
|
<div class="modal-footer" style="text-align:center">
|
|
<button type="submit" class="btn btn-primary submit_attr_button">保存</button>
|
|
<button type="button" class="btn btn-default reback">返回</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
$(function () {
|
|
$("form").submit(function () {
|
|
// console.log($(this).serialize());
|
|
//$("button[type='submit']").attr('disabled', true);
|
|
$.post('{{urlfor "MainController.Profile"}}', $(this).serialize(), function (out) {
|
|
if (out.status == 0) {
|
|
alert("保存成功");
|
|
window.location.href = '{{urlfor "MainController.Index"}}';
|
|
} else {
|
|
alert_message(out.msg,"alert-danger","alert-success");
|
|
$("button[type='submit']").attr('disabled', false);
|
|
}
|
|
}, "json");
|
|
return false;
|
|
});
|
|
});
|
|
</script>
|