<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<!-- bootstrap 3.0.2 -->
<link href="<c:url value='/styles/lib/bootstrap.min.css'/>"
	rel="stylesheet" type="text/css" />
<!-- font Awesome -->
<link href="<c:url value='/styles/lib/font-awesome.min.css'/>" rel="stylesheet" type="text/css" />
<!-- Ionicons -->
<link href='<c:url value='/styles/lib/ionicons.min.css' />' rel="stylesheet" type="text/css" />
<!-- DATA TABLES -->
<link href="<c:url value='/styles/lib/datatables/dataTables.bootstrap.css' />" rel="stylesheet" type="text/css" />
<!-- Theme style -->
<link href="<c:url value='/styles/AdminLTE.css'/>" rel="stylesheet" type="text/css" />
<!-- date -->
<script src="${ctx }/scripts/lib/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	function fn(selector,container){
	    $(selector).click(function(){
	        var stats = $(this).prop('checked') || false;
	        $(container).each(function(idx,item){
	            $(item).prop('checked',stats);
	        });
	    });
	    
	    $(container).click(function(){
	     var chklen = $(container).filter(function(idx,el){
		     if($(el).prop('checked')){
		    	 return el;
		     }
	     }).length;
		var chkStats = $(container).length === chklen;
	 		$(selector).prop('checked',chkStats);
	    });
	};
	fn("#checkAll","input[name='chkBtn']");
	$("#backBtn").click(function(){
		location.href='<c:url value='/system/elementgroup'/>';
	});
});
</script>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
	th{ text-align:center;}
	td{ text-align:center;vertical-align:middle;}
</style>
</head>
<body>
<section class="content" >
	<div class="row">
		<div class="col-xs-12">
			<div class="box">
				<!-- /.box-header -->
				<div class="box-body table-responsive">
					<form:form modelAttribute="element"  action="${ctx}/system/elementgroup/saveElement"  method="POST">
							<input type="hidden" name="elementGroup.id" value="${element.elementGroup.id }"/>
							<input type="hidden" name="id" value="${element.id }"/>
							<div class="form-group">
								<label>成员代码</label>
								<input  name="itemcode" value="${element.itemcode }"/>
								<label>成员名称</label>
								<input  name="itemname" value="${element.itemname }"/>
								<label>排序号</label>
								<input  name="orderno" value="${element.orderno }"/>
								<!--  type="submit" -->
							</div>
							<div align="left" style="margin-bottom: 8px;">
								<button type="submit"  class="btn btn-primary" >保存</button>&nbsp;
								<button type="button"  class="btn btn-back" onclick="javascript:history.go(-1)">返回</button>
							</div>
						</form:form>
</body>
</html>