<%
layout("/include/_container.html", {title:"表单", parent:"学生"}){
%>
	<script type="text/javascript">

		$(document).ready(function() {
			jp.ajaxForm("#inputForm",function(data){
				if(data.success){
				    jp.toastr_success(data.msg);
				    jp.unblock("#inputForm", 0);//立即清除loading层
					jp.go("${ctx}/test/manytomany/student");
				}else{
				    jp.toastr_error(data.msg);
				    $("#inputForm").find("button:submit").button("reset");
				}
			})

		});
		
	</script>
<div class="white-box">
		<form id="inputForm"  action="${ctx}/test/manytomany/student/save" method="post" class="form-horizontal">
		<input type="hidden" name="id" value="${student.id!}"/>
				<div class="form-group">
					<label class="col-sm-2 control-label"><font color="red">*</font>姓名：</label>
					<div class="col-sm-10">
						<input name="name" value="${student.name!}"    class="jp-input required"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">备注信息：</label>
					<div class="col-sm-10">
						<textarea name="remarks" rows="4"    class="jp-input ">${student.remarks!}</textarea>
					</div>
				</div>
		<% if(mode == "add" || mode == "edit"){ %>
		<div class="form-group">
				<div class="col-lg-3"></div>
		        <div class="col-lg-6">
		             <button class="jp-btn jp-btn-primary jp-btn-lg  btn-block btn-lg btn-parsley" data-loading-text="正在提交...">提 交</button>
		        </div>
		</div>
		<% } %>
		</form>
</div>
<% } %>