<%@ 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" %>
	<script type="text/javascript">
		$(document).ready(function() {
			$('#btnSubmit').click(function(){
			    if($('#count-input').val().length == 0){
                  alert('请输入创建人数量');
                  return false;
                }else{
                  if(!$.isNumeric($('#count-input').val())){
                    alert('创建人数必须为数字类型');
                    return false;
                  }
                }
                if($('#password-input').val().length>0 && $('#password-input').val().length<4){
			      alert('密码长度最少为4位');
			      return false;
                }
                return true;
          });
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/admin/exam-param/marker">评卷员列表</a></li>
		<li class="active"><a href="${ctx}/admin/exam-param/marker/batch-create">批量创建</a></li>
		<li><a href="${ctx}/admin/exam-param/marker/subjectViewer">科组长列表</a></li>
	</ul><br/>
	<form id="inputForm" action="${ctx}/admin/exam-param/marker/batch-create" method="post" class="form-horizontal">
		<tags:message content="${message}"/>
		<div class="control-group">
			<label class="control-label">帐号类型</label>
			<div class="controls">
				<select id="common" name="common">
					<option value="true">不限科目</option>
					<option value="false">绑定科目</option>
				</select>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">科目选择</label>
			<div class="controls">
				<select id="subjectCode" name="subjectCode">
					<option value="all">所有科目</option>
					<c:forEach items="${subjectList}" var="subject">
					<option value="${subject.code}">${subject.code}-${subject.name}</option>
					</c:forEach>
				</select>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">创建人数</label>
			<div class="controls">
				<input name="count" htmlEscape="false" maxlength="10" class="required" id="count-input"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">初始密码</label>
			<div class="controls">
				<input name="password" htmlEscape="false" maxlength="10" class="required" id="password-input"/>
			</div>
		</div>
		<div class="form-actions">
			<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form>
</body>
</html>
