<% layout('/layouts/default.html', {title: '应用接入申请表管理', libs: ['validate','fileupload']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header with-border">
			<div class="box-title">
				<i class="fa icon-note"></i> ${text(adminAccessApply.isNewRecord ? '新增应用接入申请表' : '编辑应用接入申请表')}
			</div>
			<div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
			</div>
		</div>
		<#form:form id="inputForm" model="${adminAccessApply}" action="${ctx}/admin/adminAccessApply/save" method="post" class="form-horizontal">
		<div class="box-body">
			<div class="form-unit">${text('基本信息')}</div>
			<#form:hidden path="id"/>
			<div class="row">
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('所属机构')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:select path="affiliation" dictType="admin_affiliation" blankOption="true" class="form-control required" />
						</div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('应用类别')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:select path="appType" dictType="sso_apptype" blankOption="true" class="form-control required" />
						</div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('管理员名字')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="adminName" maxlength="12" class="form-control" readonly="true"/>
						</div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required ">*</span> ${text('管理员电话')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="adminPhone" maxlength="12" class="form-control required abc" readonly="true"/>
						</div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('应用名称')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="appName" maxlength="255" class="form-control required" readonly="true"/>
						</div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('应用访问地址')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="appUrl" maxlength="255" class="form-control required" readonly="true"/>
						</div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('应用描述')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:textarea path="appDescribe" maxlength="255" class="form-control required" readonly="true"/>
						</div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('申请人姓名')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="applicatName" maxlength="12" class="form-control required" readonly="true"/>
						</div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('申请人邮箱')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="applicatEmail" maxlength="255" class="form-control required" readonly="true"/>
						</div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('申请人手机')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="applicatPhone" maxlength="12" class="form-control required" readonly="true"/>
						</div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('单点请求地址')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="requestUrl" maxlength="255" class="form-control required" readonly="true"/>
						</div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('返回属性')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:checkbox path="returnAttribute" dictType="admin_return_attribute" class="form-control required" readonly="true"/>
						</div>
					</div>
				</div>

				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('接入方式')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:radio path="access" dictType="admin_access" class="form-control" readonly="true"/>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-2">
							<span class="required hide">*</span> ${text('应用图标')}：</label>
						<div class="col-sm-10">
							<#form:fileupload id="uploadImage" filePathInputId="appImage" bizKey="${adminAccessApply.id}" bizType="adminAccessApply_image"
							uploadType="image" class="required" returnPath="true" path="appImage" readonly="false" preview="true" readonly="true"/>
							<#form:hidden name="appImage" class="form-control" readonly="true"/>

						</div>
					</div>
				</div>
			</div>
			<div class="col-xs-6">
				<div class="form-group">
					<label class="control-label col-sm-4" title="">
						<span class="required hide">*</span> ${text('审核状态(**)')}：<i class="fa icon-question hide"></i></label>
					<div class="col-sm-8">
						<#form:select path="type" dictType="admin_ispass" blankOption="true required" class="form-control" />
					</div>
				</div>
			</div>
			<!--<div class="row">
                <div class="col-xs-12">
                    <div class="form-group">
                        <label class="control-label col-sm-2">
                            <span class="required hide">*</span> ${text('附件上传')}：</label>
                        <div class="col-sm-10">
                            <#form:fileupload id="uploadFile" bizKey="${adminAccessApply.id}" bizType="adminAccessApply_file"
                                uploadType="all" class="" readonly="false" preview="true"/>
                        </div>
                    </div>
                </div>
            </div>-->
		</div>
		<div class="box-footer">
			<div class="row">
				<div class="col-sm-offset-2 col-sm-10">
					<% if (hasPermi('admin:adminAccessApply:edit')){ %>
					<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>&nbsp;
					<% } %>
					<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
				</div>
			</div>
		</div>
	</#form:form>
</div>
</div>
<% } %>
<script>
	$("#inputForm").validate({
		submitHandler: function(form){
			js.ajaxSubmitForm($(form), function(data){
				js.showMessage(data.message);
				if(data.result == Global.TRUE){
					js.closeCurrentTabPage(function(contentWindow){
						contentWindow.page();
					});
				}
			}, "json");
		}
	});
</script>
