<%@ page language="java"%>
<%@ taglib uri="struts-bean"  prefix="bean"  %>
<%@ taglib uri="struts-html"  prefix="html"  %>
<%@ taglib uri="struts-logic" prefix="logic" %>
<%@ taglib uri="vkc-taglib"   prefix="vkc"   %>

<vkc:checkLogin/>
<vkc:init/>

<html:html locale="true">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="cache" 		content="no-cache">
    <meta http-equiv="expires" 		content="0">

    <title><vkc:message key="vkc.aclManager"/></title>

  	<vkc:cssinclude />
    <script type="text/javascript" src="<vkc:rewrite page='/common/utils.js'/>"></script>

	<script type="text/javascript">
	function addAccessor(elem) {
		var form = document.forms[0];
        disableAllButtons(elem);
		top.opener.addLdapAccessor(form.ldapServerId.value,form.ldapGroupRdn.value);
	}
	</script>

</head>
<body style="margin: 0 0 0 0;" class="color_dialogborder">
<html:form action="/addLdapAccessorAcl" method="post">
  <bean:define id="form" name="addLdapAccessorAclForm" scope="request" type="vkc.view.form.AddLdapAccessorAclForm"/>

  <table class="color_dialogborder" cellspacing="0" cellpadding="3" border="0" width="100%" height="100%">
    <tr>
      <td colspan="2" class="color_titlebar" align="center">
        <font style="font-family:sans-serif; font-size:12pt; color:white;"><b><i>
          <vkc:message key="vkc.acl.add_ldap_group"/>
        </i></b></font>
      </td>
    </tr>
    <%-- logic:notEmpty ---%>
    <tr><td colspan="2">&nbsp;</td></tr>
    <tr height="100%">
      <td>
        <table width="90%" align="center" border="0" cellspacing="2">
	    <tr>
	      <td width="1%">
	        <nobr><vkc:message key="vkc.acl.ldapServer"/>:</nobr>
	      </td>
	      <td width="99%">
            <bean:define property="ldapServers" name="form" id="ldapServersCollection"/>  
	        <html:select property="ldapServerId" size="1" style="width:100%">
	          <vkc:options collection="ldapServersCollection" property="ldapServerId" labelProperty="displayName"/>
	        </html:select>
	      </td>
	    </tr>
	    <tr>
	      <td width="1%">
	        <nobr><vkc:message key="vkc.acl.groupRDN"/>:</nobr>
	      </td>
	      <td width="99%">
	        <vkc:text property="ldapGroupRdn" styleClass="inputField" maxlengthProperty="ldap.groupRdn"/>
	      </td>
	    </tr>
	    <tr><td colspan="2">&nbsp;</td></tr>
	    </table>
	  </td>
	</tr>
    <tr height="100%">
      <td colspan="2" align="center" height="100%">
        <vkc:button property="add" onclick="javascript:addAccessor(this);">
          <vkc:message key="vkc.acl.btn_add"/>
        </vkc:button>
        <vkc:button property="cancel" onclick="javascript:disableAllButtons(this);window.close();">
          <vkc:message key="vkc.acl.btn_cancel"/>
        </vkc:button>
      </td>
    </tr>
    <%-- /logic:notEmpty ---%>
  </table>
</html:form>
</body>
</html:html>