<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>通知管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		var validateForm;
		function doSubmit(){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
		  if(validateForm.form()){
			  $("#inputForm").submit();
			  return true;
		  }
	
		  return false;
		}
		$(document).ready(function() {
			validateForm = $("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
			
		});
	</script>
</head>
<body>
<div class="single-form">
	<div class="container view-form">
		<form:form id="inputForm" modelAttribute="workProjectNotify" action="${ctx}/workprojectnotify/workProjectNotify/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>
			<div class="form-group layui-row first lw6">
				<c:choose>
					<c:when test="${empty errorMsg}">
						<div class="form-group-label"><h2>基本信息</h2></div>
					</c:when>
					<c:otherwise>
						<div class="form-group-label"><h2>${errorMsg}</h2></div>
					</c:otherwise>
				</c:choose>
				<div class="layui-item layui-col-sm12">
					<label class="layui-form-label">标题：</label>
					<div class="layui-input-block">
						<input htmlEscape="false"  readonly="true"  class="form-control layui-input" value="${workProjectNotify.title}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm12 with-textarea">
					<label class="layui-form-label">内容：</label>
					<div class="layui-input-block">
						<textarea rows="4" htmlEscape="false" readonly="true" class="form-control">${workProjectNotify.content}</textarea>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label">类型：</label>
					<div class="layui-input-block">
						<input htmlEscape="false"  readonly="true"  class="form-control layui-input" value="${fns:getDictLabel(workProjectNotify.type, 'project_notify_type', '')}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label">通知发起人：</label>
					<div class="layui-input-block">
						<input htmlEscape="false"  readonly="true"  class="form-control layui-input" value="${fns:getUserById(workProjectNotify.createBy.id).name}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label">读取状态：</label>
					<div class="layui-input-block">
						<input htmlEscape="false"  readonly="true"  class="form-control layui-input" value="${fns:getDictLabel(workProjectNotify.status, 'project_notify_status', '')}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label">创建日期：</label>
					<div class="layui-input-block">
						<input htmlEscape="false"  readonly="true"  class="form-control layui-input" value="<fmt:formatDate value="${workProjectNotify.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
					</div>
				</div>
			</div>
		</form:form>
	</div>
</div>
</body>
</html>