<%@  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" />

   <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("_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">
      <TR><TD height=9></TD></TR>
         <!-- Host Server -->
         <TR>
            <TD align=left>
               <%= c.var("Host_ServerDisplayName") %>:&nbsp;
            </TD>
            <% if (session.getAttribute("DeviceType").equals("pocket")) { %></TR><TR><% } %>
            <TD>
             <INPUT name="eDir$target$Host_Server" type=hidden value="<%= c.formatMessage(c.var("toHtml"), new String[]{(c.var("eDir$target$Host_Server"))}) %>">
            <c:if test="${edasRights.target.Description.writeable}">
               <INPUT type=text name="_Host_Server" value="<x:out select="$edasXml/edas/Host_Server/value"/>" size=<%= c.string("UI.textboxSize") %> style="width:<%= c.string("UI.textboxPixel") %>">
               <% c.set("OS.Control", "_Host_Server");
			      c.set("OS.TypeFilter", "NCP Server");%>
			  <jsp:include page='<%= c.getPath("dev/OS_inc.jsp") %>' flush="true" />
			  </c:if>
            </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>
         <SCRIPT>
		   window.uiObject_Host_Server = new UiObject();
		   <c:if test="${edasRights.target.Host_Server.writeable}">
		      addToNotificationList('Host_Server', 'uih_textfield');
		      addActionHandler('Host_Server', 'uiah_textfield');
		   </c:if>
		</SCRIPT>
		<SCRIPT>
		   window.uiObject_Host_Server.m_lowerBound = null;
		   window.uiObject_Host_Server.m_upperBound = null;
		   window.uiObject_Host_Server.m_type = "string";
		</SCRIPT>
      <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>
         <% } %>

         <!-- 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>
         <SCRIPT>
		   window.uiObject_L = new UiObject();
		   <c:if test="${edasRights.target.L.writeable}">
		      addToNotificationList('L', 'uih_mvStringEditor');
		   </c:if>
		</SCRIPT>
      <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>
         <SCRIPT>
		   window.uiObject_OU = new UiObject();
		   <c:if test="${edasRights.target.OU.writeable}">
		      addToNotificationList('OU', 'uih_mvStringEditor');
		   </c:if>
		</SCRIPT>
      <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>
         <SCRIPT>
		   window.uiObject_O = new UiObject();
		   <c:if test="${edasRights.target.O.writeable}">
		      addToNotificationList('O', 'uih_mvStringEditor');
		   </c:if>
		</SCRIPT>
      <TR><TD height=9></TD></TR>
      <%-- ----------- --%>
      <%-- Description --%>
      <%-- ----------- --%>
      <TR>
         <TD align=left>
            <c:out value="${DescriptionDisplayName}"/>:&nbsp;&nbsp;
         </TD>
        <% if (session.getAttribute("DeviceType").equals("pocket")) { %></TR><TR><% } %>

         <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>
      <SCRIPT>
		   window.uiObject_Description = new UiObject();
		   <c:if test="${edasRights.target.Description.writeable}">
		      addToNotificationList('Description', 'uih_textarea');
		   </c:if>
		</SCRIPT>
      <TR><TD height=9></TD></TR>
      
      <%-- Path --%>
	<TR>
      <TD align="left">
         <iman:string key="PathUiHandlerVolume"/>:&nbsp;&nbsp;
      </TD>
   <% if (session.getAttribute("DeviceType").equals("pocket")) { %></TR><TR><% } %>
      <TD>
         <c:if test="${edasRights.target.Path.writeable}">
            <INPUT type="hidden" name="eDir$target$Path" value="<c:out value="${eDir$target$Path}" escapeXml="false"/>">
         </c:if>
         <INPUT type="hidden" name="_PathType" value="<x:out select="$edasXml/edas/Path/value/type"/>" >
         <INPUT type="text" size="<iman:string key="UI.textboxSize"/>" style="width:<iman:string key="UI.textboxPixel"/>" name="_PathVolume" value="<x:out select="$edasXml/edas/Path/value/volume"/>" <c:if test="${!edasRights.target.Path.writeable}">DISABLED</c:if>>
		      		<c:if test="${edasRights.target.Path.writeable}">
		      		   <iman:os typeFilter="Volume" control="_PathVolume"  history="true" showSubClasses="false"/>
		      		</c:if>
	  </TD>
	</TR>
	<TR><TD height="9"></TD></TR>
	 
	  <TR>
	   	<TD align="left">
	        <iman:string key="PathUiHandlerPath"/>:
	    </TD>
	  <% if (session.getAttribute("DeviceType").equals("pocket")) { %></TR><TR><% } %>
	    <TD>
	         <INPUT type="text" size="<iman:string key="UI.textboxSize"/>" style="width:<iman:string key="UI.textboxPixel"/>" name="_PathPath" value="<x:out select="$edasXml/edas/Path/value/path"/>" <c:if test="${!edasRights.target.Path.writeable}">DISABLED</c:if>>
	    </TD>
		<TD valign="top">
		   <c:set var="mode"><x:out select="$edasXml/edas/Path/@mode"/></c:set>
		      <iman:mooMode name="_Path_mode" value="${mode}" multi="true" />
		</TD>
     </TR>
	   <SCRIPT>
	      window.uiObject_Path = new UiObject();
	      <c:if test="${edasRights.target.Path.writeable}">
	         addToNotificationList('Path', 'uih_dirMapPath');
	      </c:if>
	   </SCRIPT>
      </TABLE>


</FORM>
<jsp:include page='<%= c.getPath("dev/OSFooter_inc.jsp") %>' flush="true" />
</BODY>
</HTML>
