<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>修改密码</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<!-- bootstrap 3.0.2 -->
<link href="<c:url value='/styles/lib/bootstrap.min.css'/>" rel="stylesheet" type="text/css" />
<!-- font Awesome -->
<link href="<c:url value='/styles/lib/font-awesome.min.css'/>" rel="stylesheet" type="text/css" />
<!-- Ionicons -->
<link href='<c:url value='/styles/lib/ionicons.min.css' />' rel="stylesheet" type="text/css" />
<!-- DATA TABLES -->
<link href="<c:url value='/styles/lib/datatables/dataTables.bootstrap.css' />" rel="stylesheet" type="text/css" />
<!-- Theme style -->
<link href="<c:url value='/styles/AdminLTE.css'/>" rel="stylesheet" type="text/css" />
<link href="<c:url value='/scripts/zTree/css/zTreeStyle/zTreeStyle.css'/>" rel="stylesheet"  type="text/css" />
<script type="text/javascript" src="<c:url value='/scripts/lib/jquery-1.8.2.min.js'/>"></script>
<script type="text/javascript">
	$(function(){
		$("#btn-save").bind("click",function(){
			var oldPwd=$("#oldPwd").val();
			var newPwd=$("#newPwd").val();
			var newPwd2=$("#newPwd2").val();
			if($.trim(oldPwd)==""){
				alert("请输入原始密码");
				return;
			}
			if($.trim(newPwd)==""){
				alert("请输入新密码");
				return;
			}
			if($.trim(newPwd2)==""){
				alert("请输入确认密码");
				return;
			}
			if($.trim(newPwd2)!=$.trim(newPwd)){
				alert("新密码不一致，请重新输入");
				return;
			}
			$("#conditionform").submit();
		});
	});
	
</script>
</head>
<body>
	<section class="content">
		<div class="row">
			<div class="col-md-6">
				<div class="box box-warning" >
					<div class="box-header">
						<h3 class="box-title">修改密码 &nbsp;&nbsp; <strong font-color="red">${errormsg}</strong></h3>
					</div>
					<div class="box-body">
						<form action="${ctx}/admin/users/modifyPwd" method="post" id="conditionform">
							<input type="hidden" name="actType" value="save">
							<div class="form-group">
								<label>登录用户名</label>
								<input type="text" class="form-control" readonly="true" value="<%=request.getRemoteUser()%>">
							</div>
							<div class="form-group">
								<label>原始密码<span style="color: red">*</span></label>
								<input type="password" class="form-control" name="oldPwd" id="oldPwd">
							</div>
							<div class="form-group">
								<label>新密码<span style="color: red">*</span></label>
								<input type="password" class="form-control" name="newPwd" id="newPwd">
							</div>
							<div class="form-group">
								<label>确认密码<span style="color: red">*</span></label>
								<input type="password" class="form-control" name="newPwd2" id="newPwd2">
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		
		<div align="absmiddle" style="margin-left:20px;">
			<a class="btn btn-primary" href="#" id='btn-save'>保存</a> 
			<a class="btn btn-back" href="javascript:window.close();">关闭</a>
		</div>
	</section>
</body>
</html>
