<%
layout("/include/_container.html", {title:"表单", parent:"组织机构"}){
%>
	<script type="text/javascript">

		$(document).ready(function() {
			jp.ajaxForm("#inputForm",function(data){
				if(data.success){
				    jp.toastr_success(data.msg);
				    jp.unblock("#inputForm", 0);//立即清除loading层
				    jp.go("${ctx}/test/tree/form/testTree2");
				}else{
				    jp.toastr_error(data.msg);
				    $("#inputForm").find("button:submit").button("reset");
				}
			})

		});
		
	</script>
<div class="white-box">
		<form id="inputForm"  action="${ctx}/test/tree/form/testTree2/save" method="post" class="form-horizontal">
		<input type="hidden" name="id" value="${testTree2.id!}"/>
				<div class="form-group">
					<label class="col-sm-2 control-label"><font color="red">*</font>名称：</label>
					<div class="col-sm-10">
						<input name="name" value="${testTree2.name!}"    class="jp-input required"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"><font color="red">*</font>排序：</label>
					<div class="col-sm-10">
						<input name="sort" value="${testTree2.sort!}"    class="jp-input required"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">上级父级编号:</label>
					<div class="col-sm-10">
						<#treeselect id="parent" name="parent.id" value="${testTree2.parent.id!}" labelName="parent.name" labelValue="${testTree2.parent.name!}"
						title="父级编号" url="/test/tree/form/testTree2/treeData" extId="${testTree2.id!}" class="jp-input " allowClear="true"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">备注信息：</label>
					<div class="col-sm-10">
						<textarea name="remarks" rows="4"    class="jp-input ">${testTree2.remarks!}</textarea>
					</div>
				</div>
		<% if(mode == "add" || mode == "edit"){ %>
		<div class="form-group">
				<div class="col-lg-3"></div>
		        <div class="col-lg-6">
		             <button class="jp-btn jp-btn-primary jp-btn-lg  btn-block btn-lg btn-parsley" data-loading-text="正在提交...">提 交</button>
		        </div>
		</div>
		<% } %>
		</form>
</div>
<% } %>