<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!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>修改Banner</title>
</head>
<body>
<div class="pd-20">
  <form action="${pageContext.request.contextPath }/admin/banner/update" method="post" class="form form-horizontal" id="form-member-add">
  	<input type="hidden" name="token" value="${updateToken }">
  	<input type="hidden" name="bannerId" value="${banner.bannerId }">
    <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="${banner.bannerName }" placeholder="" id="member-name" name="bannerName" datatype="*2-16" nullmsg="名称不能为空">
      </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" readonly="readonly" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'endDate\')||\'2020-10-01 00:00:00\'}'})" id="beginDate" value='<fmt:formatDate value="${banner.bannerStartDate }" pattern="yyyy-MM-dd HH:mm:ss"/>' name="bannerStartDate" class="input-text Wdate">
      </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" readonly="readonly" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'2020-10-01 00:00:00'})" id="endDate" value="<fmt:formatDate value="${banner.bannerEndDate }" pattern="yyyy-MM-dd HH:mm:ss"/>" name="bannerEndDate" class="input-text Wdate">
      </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="bannerStatus" datatype="*" nullmsg="请选择banner状态">
          <c:choose>
          	<c:when test="${banner.bannerStatus == 1 }">
          		<option value="1" selected="selected">使用中</option>
         		<option value="2">停用</option>
          	</c:when>
          	<c:otherwise>
          		<option value="1">使用中</option>
         		<option value="2" selected="selected">停用</option>
          	</c:otherwise>
          </c:choose>
        </select>
        </span> </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="bannerType" datatype="*" nullmsg="请选择banner类型">
         <c:choose>
          	<c:when test="${banner.bannerType == 1 }">
	          	<option value="1" selected="selected">Banner</option>
	            <option value="2">广告位</option>
          	</c:when>
          	<c:otherwise>
          		<option value="1">Banner</option>
	            <option value="2" selected="selected">广告位</option>
          	</c:otherwise>
         </c:choose>
          
        </select>
        </span> </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3">简介：</label>
      <div class="formControls col-5">
        <textarea name="bannerDesc" cols="" rows="" class="textarea"  placeholder="banner简介" datatype="*0-100" dragonfly="true" nullmsg="简介不能为空！" onKeyUp="textarealength(this,100)">${banner.bannerDesc }</textarea>
        <p class="textarea-numberbar"><em class="textarea-length">${fn:length(banner.bannerDesc) }</em>/100</p>
      </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){
			form[0].submit();
		}
	});
});
</script>
</body>
</html>