<%@  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" %>'>
   <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()
      {
         <% if (c.var("Task.moo").equals("false")) { %>
            mvLoadFromPack("_CN", "<%= c.toScript(c.var("otherName")) %>");
         <% } %>
      }

      <%/*------------------------------------------------------------------ */
        /*--  What should this method do?                                 -- */
        /*--  -data validation                                            -- */
        /*--  -general page cleanup before being submitted                -- */
        /*--  -if this method returns false, the page will not be saved   -- */
        /*--  Called when user leaves this page or applys changes         -- */
        /*------------------------------------------------------------------ */%>
      function isPageValid() // called when user leaves this page or applys changes
      {
         var form=document.forms[0];

         <% if (c.var("Task.moo").equals("false")) { %>
            form.otherName.value = mvGetValuesAsPack("_CN" );
         <% } %>

         return notifyAllOfExit();
      }
   </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" cellpadding="0" cellspacing="0">
      <!-- CN -->
      <% if (c.var("Task.moo").equals("false")) { %>
      <TR>
         <TD align=left>
            <%= c.string("otherName") %>:&nbsp;
         </TD>
         <TD>
            <INPUT name='otherName' type=hidden value="<%= c.formatMessage(c.var("toHtml"), new String[]{(c.var("otherName"))}) %>">
            <% c.set("MVStringEditor_name", "_CN");
               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("R") || c.var("otherNameRights").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", "_CN_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>
      <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>
   <!-- O -->
   <TR>
      <TD align=left>
         <%= c.var("ODisplayName") %>:&nbsp;
      </TD>
      <TD>
         <INPUT name="eDir$target$O" type=hidden value="<%= c.formatMessage(c.var("toHtml"), new String[]{(c.var("eDir$target$O"))}) %>">
         <% c.set("MVStringEditor_name", "_O");
            c.set("MVStringEditor_xml", c.var("eDir$target$O"));
            c.set("MVStringEditor_minLength", "1");
            c.set("MVStringEditor_maxLength", "64");
            c.set("MVStringEditor_ignoreCase", "true");
            c.set("MVStringEditor_enforceUnique", "true");
            if (c.var("eDirRights$target$O").equals("R") || c.var("eDirRights$target$O").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", "_O_mode"); %>&nbsp;&nbsp;<jsp:include page='<%= c.getPath("dev/ModeSelectorMV_inc.jsp") %>' flush="true" /><% } %>
      </TD>
   </TR>

   <TR><TD height=9></TD></TR>
   <!-- OU -->
   <TR>
      <TD align=left>
         <%= c.var("OUDisplayName") %>:&nbsp;
      </TD>
      <TD>
         <INPUT name="eDir$target$OU" type=hidden value="<%= c.formatMessage(c.var("toHtml"), new String[]{(c.var("eDir$target$OU"))}) %>">
         <% c.set("MVStringEditor_name", "_OU");
            c.set("MVStringEditor_xml", c.var("eDir$target$OU"));
            c.set("MVStringEditor_minLength", "1");
            c.set("MVStringEditor_maxLength", "64");
            c.set("MVStringEditor_ignoreCase", "true");
            c.set("MVStringEditor_enforceUnique", "true");
            if (c.var("eDirRights$target$OU").equals("R") || c.var("eDirRights$target$OU").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", "_OU_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"  biggerBox="true" size="4"/>
      </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>
