<%@  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");
   c.stringTable("FwResources");
 %>
<%@ taglib uri="/WEB-INF/iman.tld" prefix="iman" %>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/x.tld" prefix="x" %>
<x:parse xml="${edas}" var="edasXml"/>

<HTML>
<HEAD>
   <TITLE><%= c.string("ProductName") %></TITLE>
   <iman:stylesheet/>
   <iman:uihandlerTools/>
   <iman:pageScripts/>

   <jsp:include page='<%= c.getPath("dev/eMFrameScripts_inc.jsp") %>' flush="true" />
   <jsp:include page='<%= c.getPath("dev/XmlScripts_inc.jsp") %>' flush="true" />
   <jsp:include page='<%= c.getPath("dev/OSScripts_inc.jsp") %>' flush="true" />
   <jsp:include page='<%= c.getPath("dev/MVStringEditorScripts_inc.jsp") %>' flush="true" />
   <jsp:include page='<%= c.getPath("dev/ValidateIntegerScripts_inc.jsp") %>' flush="true" />

   <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];

         initWidgetFromXml(form._Host_Server, "<%= c.toScript(c.var("eDir$target$Host_Server")) %>");   // for Host Server
         initWidgetFromXml(form._Revision, "<%= c.toScript(c.var("eDir$target$Revision")) %>");   // for Revision
         initWidgetFromXml(form._Host_Resource_Name, "<%= c.toScript(c.var("eDir$target$Host_Resource_Name")) %>");   // for Host Resource Name
         <% if (c.var("Task.moo").equals("false")) { %>
            mvLoadFromPack("_CN", "<%= c.toScript(c.var("otherName")) %>");   // init for OtherName (CN)
         <% } %>
       }

      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" );   // exit for OtherName (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">
         <!-- Host Server -->
         <TR>
            <TD align=left>
               <%= c.var("Host_ServerDisplayName") %>:&nbsp;
            </TD>
            <% if (session.getAttribute("DeviceType").equals("pocket")) { %></TR><TR><% } %>
            <TD>
               <INPUT type=text name="_Host_Server" size=<%= c.string("UI.textboxSize") %> style="width:<%= c.string("UI.textboxPixel") %>" DISABLED>
            </TD>
            <TD valign=top>
               <% if (c.var("Task.moo").equals("true")) {    c.set("ModeSelector.name", "_Host_Server_mode"); %>&nbsp;&nbsp;<jsp:include page='<%= c.getPath("dev/ModeSelector_inc.jsp") %>' flush="true" /><% } %>
            </TD>
         </TR>
      <TR><TD height=9></TD></TR>
         <!-- Revision -->
         <TR>
            <TD align=left>
               <%= c.var("RevisionDisplayName") %>:&nbsp;
            </TD>
            <% if (session.getAttribute("DeviceType").equals("pocket")) { %></TR><TR><% } %>
            <TD>
               <INPUT type=text name="_Revision" size=<%= c.string("UI.numberboxSize") %> style="width:<%= c.string("UI.numberboxPixel") %>" DISABLED>
            </TD>
            <TD valign=top>
               <% if (c.var("Task.moo").equals("true")) {    c.set("ModeSelector.name", "_Revision_mode"); %>&nbsp;&nbsp;<jsp:include page='<%= c.getPath("dev/ModeSelector_inc.jsp") %>' flush="true" /><% } %>
            </TD>
         </TR>
      <TR><TD height=9></TD></TR>
         <!-- Host Resource Name -->
         <TR>
            <TD align=left>
               <%= c.var("Host_Resource_NameDisplayName") %>:&nbsp;
            </TD>
            <% if (session.getAttribute("DeviceType").equals("pocket")) { %></TR><TR><% } %>
            <TD>
               <INPUT type=text name="_Host_Resource_Name" size=<%= c.string("UI.textboxSize") %> style="width:<%= c.string("UI.textboxPixel") %>" DISABLED>
            </TD>
            <TD valign=top>
               <% if (c.var("Task.moo").equals("true")) {    c.set("ModeSelector.name", "_Host_Resource_Name_mode"); %>&nbsp;&nbsp;<jsp:include page='<%= c.getPath("dev/ModeSelector_inc.jsp") %>' flush="true" /><% } %>
            </TD>
         </TR>
      <TR><TD height=9></TD></TR>
         <!-- CN -->
         <% 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", "_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>
         <% } %>

         <!-- nssfsPool -->
<%--         <TR>--%>
<%--            <TD align="left">--%>
<%--               <c:out value="${nssfsPoolDisplayName}"/>:&nbsp;--%>
<%--            </TD>--%>
<%--            <TD>--%>
<%--               <INPUT type="hidden" name="eDir$target$nssfsPool" value="<x:out select="$edasXml/edas/nssfsPool/value"/>" >--%>
<%--               <INPUT type="text" name="_nssfsPool" value="<x:out select="$edasXml/edas/nssfsPool/value"/>" size=<iman:string key="UI.textboxSize"/> style="width:<iman:string key="UI.textboxPixel"/>" <c:if test="${!edasRights.target.nssfsPool.writeable}">DISABLED</c:if> ><SCRIPT>addToNotificationList('nssfsPool', 'uih_textfield');</SCRIPT>--%>
<%--               <c:if test="${edasRights.target.nssfsPool.writeable}" >--%>
<%--                  <iman:os typeFilter="*" control="_nssfsPool" history="true"/>--%>
<%--               </c:if>--%>
<%--            </TD>--%>
<%--            <TD valign="top">--%>
<%--               <c:set var="mode"><x:out select="$edasXml/edas/nssfsPool/@mode"/></c:set>--%>
<%--               <iman:mooMode name="_nssfsPool_mode" value="${mode}" multi="false" />--%>
<%--            </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>
         <!-- OU -->
         <TR>
            <TD align=left>
               <%= c.var("OUDisplayName") %>:&nbsp;
            </TD>
            <% if (session.getAttribute("DeviceType").equals("pocket")) { %></TR><TR><% } %>
            <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>
         <!-- O -->
         <TR>
            <TD align=left>
               <%= c.var("ODisplayName") %>:&nbsp;
            </TD>
            <% if (session.getAttribute("DeviceType").equals("pocket")) { %></TR><TR><% } %>
            <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>
      <%-- ----------- --%>
      <%-- 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>
<jsp:include page='<%= c.getPath("dev/OSFooter_inc.jsp") %>' flush="true" />
</BODY>
</HTML>
