<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>中心管理</title>
	<meta name="decorator" content="default"/>
	<%@include file="/WEB-INF/views/include/head.jsp" %>
	<%@include file="/WEB-INF/views/include/dialog.jsp" %>
	<style type="text/css">.sort{color:#0663A2;cursor:pointer;}</style>
	<script type="text/javascript">
		$(document).ready(function() {
		function page(n,s){
			$("#pageNumber").val(n);
			$("#pageSize").val(s);
			$("#searchForm").attr("action","${ctx}/admin/exam");
			$("#searchForm").submit();
	    	return false;
	    }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/admin/exam-param/campus">学习中心列表</a></li>
		<li class="active"><a href="${ctx}/admin/exam-param/campus/form">添加学习中心</a></li>
	</ul>
	<form id="searchForm"  action="${ctx}/admin/exam-param/campus/query" method="post" class="breadcrumb form-search">
		<div>
			<label>名称：</label><input type="text" name="${name }" htmlEscape="false" maxlength="50" class="input-small"/>
			<label >地区：</label> 
			<label id="area-select"></label>
			<input type="hidden" id="province" name="province" value="${campus.province}"/>
			<input type="hidden" id="city" name="city" value="${campus.city }"/>
			<input type="hidden" id="district"  name="district" value="${campus.district }"/>
			<input id="btnSubmit" class="btn btn-primary" type="button" value="查询" onclick="goSave()"/>
		</div>
	</form>
	<tags:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<form  action="${ctx}/admin/exam-param/campus/save" method="post">
			<c:forEach var="campus" items="${list }">
				<input id="campusIds" name="campusIds" type="checkbox" value="${campus.id }">${campus.name }
			</c:forEach>
			<div class="control-group">
				<div class="controls">
					<input class="btn btn-primary" type="submit" value="保存"/>
					<a href="${ctx}/admin/exam-param/campus" class="btn">返回</a>
				</div>
			</div>
		</form>
	</table>
<script type="text/javascript">
$(document).ready(function(){
	$("#area-select").chinaprovinces({province:'${query.province}', city:'${query.city}', area:'${query.district}', valueType:'name',change:function(province,city,area){
		$("#province").val(province);
		$("#city").val(city);
		$("#district").val(area);
	}});
});
function goSave(){
	$("[id^=chinaprovinces]").remove();
	$("#searchForm").submit();
}
</script>
</body>
</html>