<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	response.setHeader("Pragma","No-cache");    
	response.setHeader("Cache-Control","no-cache");    
	response.setDateHeader("Expires", -10);  
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@include file="/WEB-INF/views/base.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>添加字典分组</title>
	<%@include file="/WEB-INF/views/common_base_css.jsp"%>
</head>

<body>
	<input type="hidden" id="basePath" value="<%=basePath %>"  >
    <div id="wrapper">

    	<jsp:include page="../menu.jsp"></jsp:include>

        <div id="page-wrapper" class="gray-bg">
        	<jsp:include page="../head.jsp"></jsp:include>
        	<jsp:include page="../pageNav.jsp"></jsp:include>
            <!-- 页面 主题内容  开始-->
	        <div class="wrapper wrapper-content animated fadeInRight">
	        <div class="row">
	        	<!-- row开始 -->
	           <div class="row">
                	<div class="col-lg-12">
	                    <div class="ibox float-e-margins">
	                        <div class="ibox-title">
	                            <h5>添加字典分组</h5>
	                        </div>
	                        <div class="ibox-content">
	                        	<form:form id="form" modelAttribute="dictionary" method="post" action="addDictionaryCategoryexe" class="form-horizontal">
	                                <div class="form-group"><label class="col-sm-2 control-label">分组名称</label>
	                                    <div class="col-sm-10">
	                                    	<form:input path="dictname" autocomplete="off"  required=""  class="form-control" />
	                                    	<form:errors path="dictname" class="field-has-error"></form:errors>
	                                  	</div>
	                                </div>
		      
	                                <div class="form-group"><label class="col-sm-2 control-label">分组值</label>
	                                    <div class="col-sm-10">
	                                    	<form:input path="dictvalue" autocomplete="off" class="form-control" /> 
	                                    	<form:errors path="dictvalue" class="field-has-error"></form:errors>
	                                    </div>
	                                </div>
	                                
	                              	<div class="form-group"><label class="col-sm-2 control-label">分组说明</label>
	                                    <div class="col-sm-10">
	                                    	<form:input path="dictmemo" autocomplete="off"  required="" class="form-control" /> 
	                                    	<form:errors path="dictmemo" class="field-has-error"></form:errors>
	                                    </div>
	                                </div>
	                                
	                                <div class="form-group">
	                                    <div class="col-sm-4 col-sm-offset-2">
	                                        <button onclick="history.go(-1)" class="btn btn-warning" type="button"><i class="fa fa-mail-forward"></i>&nbsp;&nbsp;返回</button>
	                                        <button class="btn btn-primary" type="submit"><i class="fa fa-save"></i>&nbsp;&nbsp;保存</button>
	                                    </div>
	                                </div>
	                                
	                            </form:form>    
	                        </div>
	                    </div>
                	</div>
            	</div>
	            <!-- row结束 -->	
	        </div>    
	        </div>
	        <!-- 页面主题内容 结束 -->

        </div>
    </div>


    <!-- Mainly scripts -->
    <%@include file="/WEB-INF/views/common_base_script.jsp"%>
        <script>
            $(document).ready(function () {
                $('.i-checks').iCheck({
                    checkboxClass: 'icheckbox_square-green',
                    radioClass: 'iradio_square-green',
                });
            });
        </script>
        <script>
        $(function(){
        	//前台js验证
        	var ruleObj = {dictname:{required:true}, dictvalue:{required:true}};
        	var messageObj = {dictname:{required:"分组名称不能为空"}, dictvalue:{required:"分组值不能为空"}};
        	CommonUtils.formValidate("form", ruleObj, messageObj);
        })
        </script>
</body>

</html>