<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/taglib/c.tld" prefix="c"%>
<%@ include file="../common/init.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="../common/top.jsp"%>
<title>Insert title here</title>
</head>
<body class="easyui-layout">
	<%@ include file="../common/header.jsp"%>
	<%@ include file="../leftMenu/sys-admin.jsp"%>
	<div data-options="region:'center',title:'首页 -【系统管理】- 学校管理员设置'">
		<div data-options="region:'north',border:false" class="domain">
		</div>
		<div class="easyui-layout" data-options="fit:true,border:false">
			<div data-options="region:'center'" style="border-color: #ccc; border-left: none;">
				<form id="edit-form" class="form-horizontal" action="${ctx}/admin/school/admin/save" method="post">
					<input type="hidden" name="id" value="${user.id}"/>
					<input type="hidden" name="schoolId" value="${school.id}"/>
					<div class="control-group">
						<label class="control-label" for="">学校名称</label>
						<div class="controls mar">
							${school.name}
						</div>
					</div>
					<div class="control-group <c:if test="${loginNameError==true}">error</c:if>">
						<label class="control-label" for="">登录名</label>
						<div class="controls">
							<input type="text" name="loginName" value="${user.loginName}" placeholder="必填项" required/>
							<c:if test="${loginNameError==true}">
							<span class="help-inline">该登录名已存在</span>
							</c:if>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="">姓名</label>
						<div class="controls">
							<input type="text" name="name" value="${user.name}" placeholder="必填项" required/>
						</div>
					</div>
					<div class="control-group <c:if test="${passwordError==true}">error</c:if>">
						<label class="control-label" for="">密码</label>
						<div class="controls">
							<input type="password" name="newPassword" placeholder="必填项" required/>
							<c:if test="${passwordError==true}">
							<span class="help-inline">请输入正确的密码</span>
							</c:if>
						</div>
					</div>
					<div class="control-group">
						<div class="controls">
							<input class="btn btn-primary" type="submit" value="保存"/>
							<a href="${ctx}/admin/school/list" class="btn">返回</a>
						</div>
					</div>
				</form>
				</div>
				</div>
			</div>
</body>
<script type="text/javascript">
$(document).ready(function(){
		$("#area-select").chinaprovinces({province:'${school.province}', city:'${school.city}', valueType:'name',change:function(province,city,null){
			$("#edit-form :input[name='province']").val(province);
			$("#edit-form :input[name='city']").val(city);
			//$("#edit-form :input[name='district']").val(area);
		}});
});
</script>
</html>