<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/html5.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/respond.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/PIE_IE678.js"></script>
<![endif]-->
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>添加分销角色</title>
</head>
<body>
<div class="pd-20">
  <form action="${pageContext.request.contextPath }/admin/template/addTemplateInfo" method="post" class="form form-horizontal" id="form-member-add">
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>模板名称：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text" value="" placeholder="" id="member-name" name="templateName" datatype="*2-16" nullmsg="模板名称不能为空">
      </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3">模板状态：</label>
      <div class="formControls col-5"> <span class="select-box">
        <select class="select" size="1" name="state" datatype="*" nullmsg="请选择模板状态">
          <option value="" selected>请选择状态</option>
          <option value="1">使用中</option>
          <option value="2">停用</option>
        </select>
        </span> </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>返利总层级：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text" value="" placeholder="" id="count" name="count" datatype="*" nullmsg="返利总层级不能为空">
      </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3">是否全局模板：</label>
      <div class="formControls col-5"> <span class="select-box">
        <select class="select" size="1" name="isGlogal" datatype="*" nullmsg="请选择是否是全局模板">
          <option value="" selected>请选择</option>
          <option value="1">是</option>
          <option value="2">否</option>
        </select>
        </span> </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <div class="col-9 col-offset-3">
        <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
      </div>
    </div>
  </form>
</div>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.admin.js"></script>
<script type="text/javascript">
$(function(){
	$("#form-member-add").Validform({
		tiptype:2,
		callback:function(form){
			var memberName = $('#count').val();
			if (!(/^[1-9]+[0-9]*$/.test(memberName))) {
				alert("返利层级必须为数字!");
				return false;
			}
			form[0].submit();
		}
	});
});
</script>
</body>
</html>