<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" import="com.novell.webaccess.common.JSPConduit, com.novell.emframe.dev.eMFrameUtils" %>
<%   JSPConduit c = JSPConduit.getJSPConduit(request);
   c.stringTable("DevResources");
   c.stringTable("BaseResources"); %>
   <%@ taglib uri="/WEB-INF/iman.tld" prefix="iman" %>
   <%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
   <%@ taglib uri="/WEB-INF/x.tld" prefix="x" %>
<HTML>
<HEAD>
   <TITLE><%= c.string("ProductName") %></TITLE>

   <jsp:include page='<%= c.getPath("dev/XmlScripts_inc.jsp") %>' flush="true" />
   <iman:uihandlerTools/>
   <iman:pageScripts/>
   <iman:eMFrameScripts/>
   <iman:validateNumberScripts/>

   <LINK rel='stylesheet' href='<%= c.getModulesUrl() + "/dev/css/hf_style.css" %>'>
   <jsp:include page='<%= c.getPath("dev/PageScripts_inc.jsp") %>' flush="true" />
   <x:parse xml="${edas}" var="edasXml"/>
   <iman:mvedScripts mode="mvsel"/><%-- Always include for the description field --%>
   <c:if test="${DeviceType=='browser'}">
      <iman:mvedScripts mode="mvie"/>
   </c:if>   
   <SCRIPT language="JavaScript">
      function onInit()
      {
         var form=document.forms[0];
         <% if (c.var("Task.moo").equals("false")) { %>
            mvLoadFromPack("_ou", "<%= c.toScript(c.var("otherName")) %>");
         <% } %>
         mvLoadFromXml("_l", "<%= c.toScript(c.var("eDir$target$l")) %>");
         mvLoadFromXml("_facsimileTelephoneNumber", "<%= c.var("eDir$target$facsimileTelephoneNumber") %>");
         mvLoadFromXml("_telephoneNumber", "<%= c.toScript(c.var("eDir$target$telephoneNumber")) %>");
         mvLoadFromXml("_description", "<%= c.toScript(c.var("eDir$target$description")) %>");
      }

      function isPageValid()
      {
         var form=document.forms[0];

         <% if (c.var("Task.moo").equals("false")) { %>
            form.otherName.value = mvGetValuesAsPack("_ou" );
         <% } %>
         form.eDir$target$l.value = mvGetValuesAsXml("_l" );
         form.eDir$target$facsimileTelephoneNumber.value = mvGetValuesAsXml("_facsimileTelephoneNumber");
         form.eDir$target$telephoneNumber.value = mvGetValuesAsXml("_telephoneNumber" );
         form.eDir$target$description.value = mvGetValuesAsXml("_description" );

         return true;
      }
   </SCRIPT>
</HEAD>

<BODY onLoad="onInit();">
<FORM name="form" method=post action="webacc">
   <jsp:include page='<%= c.getPath("dev/Messagebar_inc.jsp") %>' flush="true" />
	<jsp:include page='<%= c.getPath("dev/BookVars_inc.jsp") %>' flush="true" />

   <!---- UI Created by UiHandlers ---->

      <TABLE class="mediumtext" border='0' bgcolor='#FFFFFF' cellpadding='0' cellspacing='0'>
         <!-- ou -->
         <% if (c.var("Task.moo").equals("false")) { %>
         <TR>
            <TD align=left>
               <%= c.string("otherName") %>:&nbsp;
            </TD>
            <% if (session.getAttribute("DeviceType").equals("pocket")) { %></TR><TR><% } %>
            <TD>
               <INPUT name='otherName' type=hidden value="<%= c.formatMessage(c.var("toHtml"), new String[]{(c.var("otherName"))}) %>">
               <% c.set("MVStringEditor_name", "_ou");
                  c.set("MVStringEditor_minLength", "1");
                  c.set("MVStringEditor_maxLength", "64");
                  c.set("MVStringEditor_ignoreCase", "true");
                  c.set("MVStringEditor_enforceUnique", "true");
                  if (!c.var("otherNameRights").equals("RW")) {    c.set("MVStringEditor_readonly", "true");    } %>
               <jsp:include page='<%= c.getPath("dev/MVStringEditor_inc.jsp") %>' flush="true" />
            </TD>
            <TD valign=top>
               <% if (c.var("Task.moo").equals("true")) {    c.set("ModeSelectorMV.name", "_ou_mode"); %>&nbsp;&nbsp;<jsp:include page='<%= c.getPath("dev/ModeSelectorMV_inc.jsp") %>' flush="true" /><% } %>
            </TD>
         </TR>
         <TR><TD height=9></TD></TR>
         <% } %>
      <!-- l -->
      <TR>
         <TD align=left>
            <%= c.var("lDisplayName") %>:&nbsp;
         </TD>
         <% if (session.getAttribute("DeviceType").equals("pocket")) { %></TR><TR><% } %>
         <TD>
            <INPUT name='eDir$target$l' type=hidden value="<%= c.formatMessage(c.var("toHtml"), new String[]{(c.var("eDir$target$l"))}) %>">
            <% c.set("MVStringEditor_name", "_l");
               c.set("MVStringEditor_xml", c.var("eDir$target$l"));
               c.set("MVStringEditor_minLength", "1");
               c.set("MVStringEditor_maxLength", "128");
               c.set("MVStringEditor_ignoreCase", "true");
               c.set("MVStringEditor_enforceUnique", "true");
               if (c.var("eDirRights$target$l").equals("R") || c.var("eDirRights$target$l").equals("NONE")) {    c.set("MVStringEditor_readonly", "true");    } %>
            <jsp:include page='<%= c.getPath("dev/MVStringEditor_inc.jsp") %>' flush="true" />
         </TD>
         <TD valign=top>
            <% if (c.var("Task.moo").equals("true")) {    c.set("ModeSelectorMV.name", "_l_mode"); %>&nbsp;&nbsp;<jsp:include page='<%= c.getPath("dev/ModeSelectorMV_inc.jsp") %>' flush="true" /><% } %>
         </TD>
      </TR>

      <TR><TD height=9></TD></TR>
      <!-- facsimileTelephoneNumber -->
      <TR>
         <TD align=left>
            <%= c.var("facsimileTelephoneNumberDisplayName") %>:&nbsp;
         </TD>
         <% if (session.getAttribute("DeviceType").equals("pocket")) { %></TR><TR><% } %>
         <TD>
            <INPUT name='eDir$target$facsimileTelephoneNumber' type=hidden value="<%= c.formatMessage(c.var("toHtml"), new String[]{(c.var("eDir$target$facsimileTelephoneNumber"))}) %>">
            <% c.set("MVStringEditor_name", "_facsimileTelephoneNumber");
               c.set("MVStringEditor_xml", c.var("eDir$target$facsimileTelephoneNumber"));
               c.set("MVStringEditor_maxLength", "32");
               c.set("MVStringEditor_enforceUnique", "true");
               if (c.var("eDirRights$target$facsimileTelephoneNumber").equals("R") || c.var("eDirRights$target$facsimileTelephoneNumber").equals("NONE")) {    c.set("MVStringEditor_readonly", "true");    } %>
            <jsp:include page='<%= c.getPath("dev/MVStringEditor_inc.jsp") %>' flush="true" />
         </TD>
         <TD valign=top>
            <% if (c.var("Task.moo").equals("true")) {    c.set("ModeSelectorMV.name", "_facsimileTelephoneNumber_mode"); %>&nbsp;&nbsp;<jsp:include page='<%= c.getPath("dev/ModeSelectorMV_inc.jsp") %>' flush="true" /><% } %>
         </TD>
      </TR>

      <TR><TD height=9></TD></TR>
      <!-- telephoneNumber -->
      <TR>
         <TD align=left>
            <%= c.var("telephoneNumberDisplayName") %>:&nbsp;
         </TD>
         <% if (session.getAttribute("DeviceType").equals("pocket")) { %></TR><TR><% } %>
         <TD>
            <INPUT name='eDir$target$telephoneNumber' type=hidden value="<%= c.formatMessage(c.var("toHtml"), new String[]{(c.var("eDir$target$telephoneNumber"))}) %>">
            <% c.set("MVStringEditor_name", "_telephoneNumber");
               c.set("MVStringEditor_xml", c.var("eDir$target$telephoneNumber"));
               c.set("MVStringEditor_maxLength", "32");
               c.set("MVStringEditor_enforceUnique", "true");
               if (c.var("eDirRights$target$telephoneNumber").equals("R") || c.var("eDirRights$target$telephoneNumber").equals("NONE")) {    c.set("MVStringEditor_readonly", "true");    } %>
            <jsp:include page='<%= c.getPath("dev/MVStringEditor_inc.jsp") %>' flush="true" />
         </TD>
         <TD valign=top>
            <% if (c.var("Task.moo").equals("true")) {    c.set("ModeSelectorMV.name", "_telephoneNumber_mode"); %>&nbsp;&nbsp;<jsp:include page='<%= c.getPath("dev/ModeSelectorMV_inc.jsp") %>' flush="true" /><% } %>
         </TD>
      </TR>

      <TR><TD height=9></TD></TR>
  <!-- description -->
   <TR>
      <TD align=left>
         <c:out value="${descriptionDisplayName}"/>:&nbsp;&nbsp;
      </TD>
      <c:if test="${DEVICE_TYPE=='pocket'}"></TR><TR></c:if>

      <TD>
         <c:if test="${edasRights.target.description.writeable}">
            <INPUT type="hidden" name="eDir$target$description" value="<c:out value="${eDir$target$description}" escapeXml="false"/>" >
            <SCRIPT>addToNotificationList('description', 'uih_mvStringEditor');</SCRIPT>
         </c:if>

         <x:set var="MVStringEditor_xmlNodeSet" select="$edasXml/edas/description" scope="request"/>
         <c:set var="MVStringEditor_bigEditBox" value="true" scope="request"/>
         <iman:mved mode="mvsel" maxLength="1024" readonly="${!edasRights.target.description.writeable}" enforceUnique="true" ignoreCase="true" minLength="1" name="_description"/>
      </TD>
      <TD valign=top>
         <c:set var="mode"><x:out select="$edasXml/edas/description/@mode"/></c:set>
         <iman:mooMode name="_description_mode" value="${mode}" multi="true"/>
      </TD>
   </TR>

      <TR><TD height=9></TD></TR>
      </TABLE>


</FORM>
</BODY>
</HTML>

