<%@ page language="java" pageEncoding="utf-8"%>
<!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"%>
<link rel="stylesheet" type="text/css" href="${ctx}/static/style/exam.css">
<script type="text/javascript" src="${ctx}/static/js/bootstrap-alert.js"></script>
</head>
<body class="easyui-layout">
	<%@ include file="../../common/header.jsp"%>
	<div
		data-options="region:'center',title:'首页 -<a href=/admin/exam/list>【考试管理】</a>- 新建考试'">
		<div class="easyui-layout" data-options="fit:true,border:false">
			<div data-options="region:'center'" style="border-color: #ccc; border-left: none;">
				<div class="row-fluid exam-add-content">
					<div class="exam-add-right span10 ">
						<div class="current-position">
							<div class="curr-nav">当前位置：新建考试-考试基础信息</div>
							<%@ include file="../../common/message.jsp"%>
						</div>
						<div class="detail-cont row-fluid">
							<form id="examFrm" class="form-horizontal" action="${ctx}/admin/exam-param/update" method="post">
								<input type="hidden" id="id" name="id" value="${exam.id}" />
								<input type="hidden" id="scope" name="scope" value="1" />
								<div class="control-group">
									<label class="control-label" for="">考试名称</label>
									<div class="controls">
										<input type="text" id="name" name="name" placeholder="请输入考试名称" required="true" value="${exam.name}"/>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label" for="">考试时间</label>
									<div class="controls">
										<input class="easyui-datebox" required="true" id="examTime" type="text" name="examTime"
											value="<c:if test="${exam.examTime != null}"><fmt:formatDate value="${exam.examTime}" pattern="yyyy-MM-dd"/></c:if>"/>
									</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 }">checked="checked"</c:if>>学校考试</option>
											<option value="2" <c:if test="${exam.scope==2 }">checked="checked"</c:if>>区域考试</option>
										</select>
									</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">
									<div class="controls">
										<input class="btn  btn-primary" type="button" onclick="save()" value="保存并下一步"/> 
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

<script type="text/javascript">
function save() {
	if ($('#examFrm').form('validate')) {
		var examTime = $("input[name='examTime']").val()
		examTime += " 00:00:00"
		$("input[name='examTime']").val(examTime);
		$('#examFrm').submit();
	}
}
</script>
</body>

</html>