<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="/common/taglibs.jspf"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
<script src="${ctx}/static/plugins/artTemplate/js/template.js"></script>
<script src="${ctx}/static/resource/buss/advertEdit.js"></script>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal">
		<input type="hidden" id="advId" value="${advert.advId}">
		<section class="panel panel-default">
			<div class="panel-body">
				<div class="form-group">
					<label class="col-sm-3 control-label">广告名称</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkRole"
							placeholder="请输入广告名称" id="name" value="${advert.name}" />
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">广告位</label>
					<div class="col-sm-9">
						<input type="hidden" id="_postId" value="${advert.postId}">
						<select id="postId" class="form-control">
						</select>
						<script type="text/html" id="postHtml">
						{{each content as p}}
							<option value='{{p.postId}}'>{{p.name}}</option>
						{{/each}}
						</script>
					</div>
				</div>
				
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">展示类型</label>
					<div class="col-sm-9">
						<select id="type" class="form-control">
							<option value="1"
								<c:if test="${advert.type eq 1}"> selected="selected" </c:if>>图片</option>
							<option value="0"
								<c:if test="${advert.type eq 2}"> selected="selected" </c:if>>视频</option>
						</select>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">计费金额</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" placeholder="广告位付费金额"
							id="payAmt" value="${advert.payAmt}">
					</div>
				</div>
				<%-- <div class="form-group">
				<label class="col-sm-3 control-label">开始时间</label>
				<div class="col-sm-4">
					<input type="date" class="form-control checkRole"
						placeholder="投放开始时间" id="beginTime" value="${advert.beginTime}" />
				</div>
				<label class="col-sm-3 control-label">结束时间</label>
				<div class="col-sm-4">
					<input type="date" class="form-control checkRole"
						placeholder="投放结束时间" id="endTime" value="${advert.endTime}" />
				</div>
			</div> --%>
				<div class="form-group">
					<label class="col-sm-3 control-label">投放状态</label>
					<div class="col-sm-9">
						<select id="status" class="form-control">
							<option value="1"
								<c:if test="${advert.status eq 1}"> selected="selected" </c:if>>投放中</option>
							<option value="0"
								<c:if test="${advert.status eq 0}"> selected="selected" </c:if>>停放</option>
						</select>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">广告图片</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" placeholder="广告效果图"
							id="fpath" value="${advert.fpath}">
					</div>
				</div>
			</div>
			<footer class="panel-footer text-left bg-light lter">
				&nbsp;&nbsp;&nbsp;&nbsp;<button type="button" class="btn btn-primary btn-s-xs"
					id="submitBtn">提交保存</button>
				<span style="color:red;">保存后，广告位不可修改</span>
			</footer>
		</section>
	</form>
</body>
</html>