<%@ 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"%>
<script type="text/javascript" src="${ctx}/static/admin/js/jquery.edatagrid.js"></script>
<script type="text/javascript" src="${ctx}/static/admin/js/easyui-lang-zh_CN.js"></script>
</head>
<body class="easyui-layout">
	<%@ include file="../common/header.jsp"%>
	<%@ include file="../leftMenu/exam-admin.jsp"%>
	<div data-options="region:'center',title:'首页 -【考试管理】- 考试列表'">
		<div data-options="region:'north',border:false" class="domain">
			<p>
				<a href='${ctx}/admin/exam/list' class="btn fr">
						<i class="icon-hand-left"></i> 返回
				</a>
			</p>
		</div>
		<div class="detail-cont row-fluid">
				<form id="examFrm" class="form-horizontal" action="${ctx}/admin/exam/edit" method="post">
					<input type="hidden" name="id" value="${exam.id}"/>
					<div class="control-group"></div>
					<div class="control-group">
						<label class="control-label" for="">考试名称</label>
						<div class="controls">
							<input name="name" type="text" value="${exam.name}" required="true"/>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="">考试时间</label>
						<div class="controls">
							<input id="examTime" name="examTime" type="text" style="height:30px" value="${exam.examTime}" class="easyui-datebox" required="true" />
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="">图片服务地址</label>
						<div class="controls">
							<input type="text" id="imageServer" name="imageServer" value="${exam.imageServer}"/>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="">描述</label>
						<div class="controls">
							<textarea rows="4" id="description" name="description" class="input-xxlarge">${exam.description}
							</textarea>
						</div>
					</div>
					<!--  
					<div class="control-group">
						<label class="control-label" for="">考试区域</label>
						<div class="controls">
							<select name="scope">
								<option value="1" <c:if test="${exam.scope==1}">selected="selected"</c:if>>学校考试</option>
								<option value="2" <c:if test="${exam.scope==2}">selected="selected"</c:if>>区域考试</option>
							</select>
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label" for="">文理科</label>
						<div class="controls">
							<select name="hasClassType">
								<option value="0" <c:if test="${exam.scope==0}">selected="selected"</c:if>>不分</option>
								<option value="1" <c:if test="${exam.scope==1}">selected="selected"</c:if>>区分</option>
							</select>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="">包含往届</label>
						<div class="controls">
							是<input type="radio" <c:if test="${exam.scope==0}">checked="checked"</c:if>
								name="hasGraduateType" value="0"> 否<input type="radio"
								<c:if test="${exam.scope==1}">checked="checked"</c:if> name="hasGraduateType" value="1">
						</div>
					</div>
					-->
					<div class="control-group">
						<div class="controls">
							<input class="btn btn-primary" type="button" onclick="save()" value="保存" /> 
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
$(document).ready(function(){
	$('#examTime').datebox({"required":true});
});

function submit(){
	var examTime = $("input[name='examTime']").val();
	examTime += " 00:00:00";
	$("input[name='examTime']").val(examTime);
	$('#examFrm').submit();
}

function save() {
	if ($('#examFrm').form('validate')) {
		submit();
	}
}
</script>
</html>