<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../language.jsp" %>

<script src="../scripts/itsm/security/ldap.js?random=<%=new java.util.Date().getTime()%>"></script>
<div style="padding:10px;color:#555555" id="ldapMain_loading"><img src="../images/icons/loading.gif" /></div>
<!-- 数据列表 -->
<div style="padding:3px;display:none" id="ldapMain_content">

    <div style="overflow:hidden;padding:0px;" >
    <table id="ldapGrid"></table>
    <div id="ldapPager"></div>
    
    <div id="ldapTopMenu" style="display:none">
	<a class="easyui-linkbutton"  plain="true" icon="icon-add" id="link_ldap_add" ><fmt:message key="common.add"/></a> 
	<a class="easyui-linkbutton"  plain="true" icon="icon-edit"  id="link_ldap_edit" ><fmt:message key="common.edit"/></a> 
	<a class="easyui-linkbutton"  plain="true" icon="icon-cancel"  id="link_ldap_delete" ><fmt:message key="common.delete"/></a> 
	<a class="easyui-linkbutton"  plain="true" icon="icon-search"  id="link_ldap_search" ><fmt:message key="common.search"/></a>  
	</div> 
    
    
    </div> 




<!-- 新增ldap-->
<div id="addLdap" class="easyui-window" icon="icon-edit"  closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" title="<fmt:message key="title.ldap.addOrEditLDAP"/>"
 style="width:620px;height:auto ">
 	
 	<div id="ldapData" class="lineTableBgDiv">
 	
 	<form id="ldapForm" method="post">

		<table style="width:100%" class="lineTable" cellspacing="1">
 			<tr>
 				<td colspan="2"><span id="ldapConfigError" style="color:red;"></span></td>
 			</tr>
 			<tr>
 				<td style="width:20%"><fmt:message key="label.ldap.name"/></td>
 				<td style="width:80%"><input name="ldapDto.ldapName" id="ldapName" class="easyui-validatebox input" required="true" /></td>
 			</tr>
 			<tr>
 				<td><fmt:message key="label.type"/></td>
 				<td>
 				<select name="ldapDto.ldapType" id="ldapType" class="easyui-validatebox input" required="true">
 					<option value="">--<fmt:message key="label.type"/>--</option>
 					<option value="Microsoft AD(Active Directory)">Microsoft AD(Active Directory)</option>
 					<option value="Novell eDirectory">Novell eDirectory</option>
 					<option value="Openldap">Openldap</option>
 					<option value="Other">Other</option>
 				</select>
 			</tr>
 			<tr>
 				<td><fmt:message key="label.ldap.server"/></td>
 				<td><input name="ldapDto.ldapURL" id="ldapURL" value="ldap://serversName" class="easyui-validatebox input" required="true" /></td>
 			</tr>
 			<tr>
 				<td><fmt:message key="label.ldap.port"/></td>
 				<td><input name="ldapDto.prot" id="prot" value="389"  style="width:35px"/></td>
 			</tr>
 			<tr>
 				<td><fmt:message key="i18n.username"/></td>
 				<td><input name="ldapDto.adminName" id="adminName"  class="input"/></td>
 			</tr>
 			<tr>
 				<td><fmt:message key="i18n.password"/></td>
 				<td><input type="password" name="ldapDto.adminPassword" id="adminPassword" class="input"/></td>
 			</tr>
 			<tr>
 				<td>BaseDN</td>
 				<td><input name="ldapDto.searchBase" id="searchBase" value="CN=Users,DC=domainname,DC=com" class="input"/></td>
 			</tr>
 			<tr>
 				<td><fmt:message key="label.ldap.searchFilter"/></td>
 				<td><input name="ldapDto.searchFilter" id="searchFilter" value="objectClass=users" class="input"/></td>
 			</tr>
 			
 			<tr>
				<td colspan="2">
					<input type="hidden" name="ldapDto.ldapId" id="ldapId" value="0" />
					
					<a id="link_conn_test" class="easyui-linkbutton" icon="icon-ok"><fmt:message key="label.basicSettings.connectionTest"/></a>
					<a id="link_ldap_save" class="easyui-linkbutton" icon="icon-save" ><fmt:message key="common.save"/></a>
					
				</td>
			</tr>
 		</table>
 		
 		
 	</form>
 	
 	</div>
 	
 </div>
 
 
 
<!-- 搜索 -->
<div id="searchLdap" class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" modal="false" title="<fmt:message key="label.ladp.searchLDAP"/>" style="width:400px;height:auto">
<form>
<div class="lineTableBgDiv">
		<table style="width:100%" class="lineTable" cellspacing="1">
		<tr>
 				<td style="width:30%"><fmt:message key="label.ladp.ladpType"/></td>
 				<td style="width:70%">
 				<select name="queryDto.ldapType" class="input">
 					<option value="">--<fmt:message key="label.ladp.ladpType"/>--</option>
 					<option value="Microsoft">Microsoft AD(Active Directory)</option>
 					<option value="Novell">Novell eDirectory</option>
 					<option value="Openldap">Openldap</option>
 					<option value="Other">Other</option>
 				</select>
 		</tr>
 		<tr>
 			<td><fmt:message key="label.ldap.name"/></td>
 			<td><input name="queryDto.ldapName" class="input"/></td>
 		</tr>
 		<tr>
 			<td><fmt:message key="label.ldap.server"/></td>
 			<td><input name="queryDto.ldapURl" class="input"/></td>
 		</tr>
 		<tr>
		<td colspan="2">
		<a class="easyui-linkbutton" icon="icon-search" id="link_start_search"><fmt:message key="common.search"/></a></td>
	</tr>
	</table>
	</div>
</form>
</div>


</div>