<%
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/treetable/form/car2");
				}else{
				    jp.toastr_error(data.msg);
				    $("#inputForm").find("button:submit").button("reset");
				}
			})
			
		});
	</script>
<div class="white-box">
		<form id="inputForm"  action="${ctx}/test/treetable/form/car2/save" method="post" class="form-horizontal">
		<input type="hidden" name="id" value="${car2.id!}"/>
				<div class="form-group">
					<label class="col-sm-2 control-label">品牌：</label>
					<div class="col-sm-10">
						<input name="name" value="${car2.name!}"    class="jp-input "/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">车系：</label>
					<div class="col-sm-10">
						<#treeselect id="kind" name="kind.id"  labelName="kind.name" labelValue="${car2.kind.name!}"
							title="车系" url="/test/treetable/form/carKind2/treeData" extId="${car2.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 ">${car2.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>
<% } %>