<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>补充资料清单管理</title>
	<meta name="decorator" content="default"/>
	 <link href="${ctxStatic}/summernotenew/summernote.css" rel="stylesheet">
	 <link href="${ctxStatic}/summernotenew/summernote-bs3.css" rel="stylesheet">
	<script src="${ctxStatic}/summernotenew/summernote.min.js"></script>
	<script src="${ctxStatic}/summernotenew/lang/summernote-zh-CN.js"></script>
	<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);
					}
				}
			});
			
				//富文本初始化
			$('.summernote').summernote({
                lang: 'zh-CN',
				height:'300px'
            });
            getCurrentDocumentHei();
		});
        function getCurrentDocumentHei(){
            var height = $(document).outerHeight();
            parent.$("#controltype").attr("height",height +"px")
		}
	</script>
	<style>
		.note-editor .panel-heading{
			padding:3px 5px;
		}
	</style>
</head>
<body>
<div class="single-form">
		<form:form id="inputForm" modelAttribute="workInfoList" action="${ctx}/workinfolist/workInfoList/save" method="post" class="form-horizontal">
			<form:hidden path="id"/>
			<sys:message content="${message}"/>
			<input type="hidden" name="projectId" id="projectId">

			<div class="form-group layui-row first">
				<div class="form-group-label"><h2>基础信息</h2></div>
				<div class="layui-item layui-col-sm12">
					<label class="layui-form-label"><span class="require-item">*</span>内容：</label>
					<div class="layui-input-block">
						<textarea id="content" name="content"  class="form-control summernote required" placeholder="内容" required>${workInfoList.content}</textarea>
					</div>
				</div>
			</div>
		</form:form>
</div>
</body>
</html>
