ZhiYeJianKang/职业健康平台后端/target/dzzyb/webpage/modules/sys/changePwdTab.jsp
2025-02-20 15:25:59 +08:00

168 lines
5.8 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
<title>个人信息</title>
<meta name="decorator" content="default"/>
<script type="text/javascript">
$(document).ready(function() {
if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
width='auto';
height='auto';
}else{//如果是PC端,根据用户设置的width和height显示。
width='700px';
height='500px';
}
$("#userPassWordBtn").click(function(){
top.layer.open({
type: 2,
area: [width, height],
title:"修改密码",
content: "${ctx}/sys/changePwd/modifyPwd" ,
btn: ['确定', '关闭'],
yes: function(index, layero){
var body = top.layer.getChildFrame('body', index);
var inputForm = body.find('#inputForm');
var btn = body.find('#btnSubmit');
var top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
inputForm.validate({
rules: {
},
messages: {
confirmNewPassword: {equalTo: "输入与上面相同的密码"}
},
submitHandler: function(form){
loading('正在提交,请稍等...');
form.submit();
},
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
}
}
});
if(inputForm.valid()){
loading("正在提交,请稍等...");
inputForm.submit();
top.layer.close(index);//关闭对话框。
}else{
return;
}
},
cancel: function(index){
}
});
});
$("#userInfoBtn").click(function(){
top.layer.open({
type: 2,
area: [width, height],
title:"个人信息编辑",
content: "${ctx}/sys/user/infoEdit" ,
btn: ['确定', '关闭'],
yes: function(index, layero){
var body = top.layer.getChildFrame('body', index);
var inputForm = body.find('#inputForm');
var top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
inputForm.validate();
if(inputForm.valid()){
loading("正在提交,请稍等...");
inputForm.submit();
}else{
return;
}
top.layer.close(index);//关闭对话框。
},
cancel: function(index){
}
});
});
$("#userImageBtn").click(function(){
top.layer.open({
type: 2,
area: [width, height],
title:"上传头像",
content: "${ctx}/sys/user/imageEdit" ,
// btn: ['确定', '关闭'],
yes: function(index, layero){
var body = top.layer.getChildFrame('body', index);
var inputForm = body.find('#inputForm');
var top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
inputForm.validate();
if(inputForm.valid()){
loading("正在提交,请稍等...");
inputForm.submit();
}else{
return;
}
top.layer.close(index);//关闭对话框。
},
cancel: function(index){
}
});
});
});
</script>
</script>
</head>
<body>
<body>
<form:form id="inputForm" modelAttribute="user" action="${ctx}/sys/changePwd/modifyPwd" method="post" class="form-horizontal form-group">
<form:hidden path="id"/>
<sys:message content="${message}"/>
<div class="control-group">
</div>
<div class="control-group">
<label class="col-sm-3 control-label"><font color="red">*</font>旧密码:</label>
<div class="controls">
<input id="oldPassword" name="oldPassword" type="password" value="" maxlength="50" minlength="3" class="form-control max-width-250 required"/>
</div>
</div>
<div class="control-group">
<label class="col-sm-3 control-label"><font color="red">*</font>新密码:</label>
<div class="controls">
<input id="newPassword" name="newPassword" type="password" value="" maxlength="50" minlength="3" class="form-control max-width-250 required"/>
</div>
</div>
<div class="control-group">
<label class="control-label"><font color="red">*</font>确认新密码:</label>
<div class="controls">
<input id="confirmNewPassword" name="confirmNewPassword" type="password" value="" maxlength="50" minlength="3" class="form-control max-width-250 required" equalTo="#newPassword"></input>
</div>
</div>
<div style="margin-left: 100px;" class="control-group">
</div>
<div style="margin-left: 100px;" class="control-group">
<input type="submit" value="修改" maxlength="70" minlength="5" onclick="beforeSubmit"/>
<input type="reset" value="重置" maxlength="70" minlength="5" />
</div>
<div class="form-actions">
<input id="btnSubmit" class="btn btn-primary" type="submit" style="display:none" value="保 存"/>
</div>
</form:form>
</body>
</html>