<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" import="com.novell.webaccess.common.JSPConduit,
                  java.util.ResourceBundle,
                  com.novell.emframe.dev.eMFrameUtils" %>

<%@ taglib uri="/WEB-INF/iman.tld" prefix="iman" %>

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/x.tld" prefix="x" %>




<iman:stringtable bundle="DevResources"/>
<x:parse xml="${edas}" var="edasXml"/>



<HTML>
<HEAD>
   <TITLE><iman:string key="ProductName"/></TITLE>
   <iman:stylesheet/>
   <iman:uihandlerTools/>
   <iman:pageScripts/>
   <iman:eMFrameScripts/>
   <iman:validateNumberScripts/>
   <iman:osScripts/>

   <SCRIPT>
      function onInit()
      {
      
      }

      function isPageValid()
      {
         var form=document.forms[0];
         return notifyAllOfExit();
      }
      
      
	
      
      
	  /*
	  	  This method is written to fix the 
     	  Bug 374658 - Login script screen should adjust to the width of the browser.
	  */
      function resizeTextArea(t) {

		a = t.value.split('\n');
		b=1;
		for (x=0;x < a.length; x++) {
			 if (a[x].length >= t.cols)
			 	b+= Math.floor((a[x].length-20)/t.cols);
		}
		b+= a.length;
		if (b > t.rows) 
			t.rows = b;
	  }
	  
	  
   </SCRIPT>
</HEAD>

<BODY onLoad="onInit();returnFromOS();">
<FORM name="form" method=post action="webacc">
   <iman:include page="dev/Messagebar_inc.jsp"/>
   <iman:include page="dev/BookVars_inc.jsp"/>


   <TABLE class="mediumtext" border="0" cellpadding="0" cellspacing="0">

      <%-- Login Script --%>
      <TR>
         <TD align="left" colspan="2">
            <c:out value="${Login_ScriptDisplayName}"/>:&nbsp;&nbsp;
         </TD>
      </TR>
      <TR>
         <TD>
            <c:if test="${edasRights.target.Login_Script.writeable  || taskIsMoo=='true'}">
               <INPUT type="hidden" name="eDir$target$Login_Script" value="<c:out value="${eDir$target$Login_Script}" escapeXml="false"/>">
               <SCRIPT>addToNotificationList('Login_Script', 'uih_textfield');</SCRIPT>
            </c:if>
            <TEXTAREA name="_Login_Script" id="_Login_Script" onkeyup="resizeTextArea(this);"  style="width:<iman:string key="UI.loginscripttextboxPixel"/>" rows='<iman:string key="UI.textareaRows"/>' cols='<iman:string key="UI.textareaMaxCols"/>'  <c:if test="${!edasRights.target.Login_Script.writeable}">DISABLED</c:if>><x:out select="$edasXml/edas/Login_Script/value"/></TEXTAREA>
         </TD>
         <TD valign="top">
            <c:set var="mode"><x:out select="$edasXml/edas/Login_Script/@mode"/></c:set>
            <iman:mooMode name="_Login_Script_mode" value="${mode}" multi="false" />
         </TD>
      </TR>
      <TR><TD height="9"></TD></TR>

      <%-- Profile --%>
      <TR>
         <TD align="left" colspan="2">
            <c:out value="${ProfileDisplayName}"/>:&nbsp;&nbsp;
         </TD>
      </TR>
      <TR>
         <TD>
            <c:if test="${edasRights.target.Profile.writeable  || taskIsMoo=='true'}">
               <INPUT type="hidden" name="eDir$target$Profile" value="<c:out value="${eDir$target$Profile}" escapeXml="false"/>">
               <SCRIPT>addToNotificationList('Profile', 'uih_textfield');</SCRIPT>
            </c:if>
            <INPUT type="text" name="_Profile" value="<x:out select="$edasXml/edas/Profile/value"/>" size=<iman:string key="UI.textboxSize"/> style="width:<iman:string key="UI.textboxPixel"/>"   <c:if test="${!edasRights.target.Profile.writeable}">DISABLED</c:if> >
            <c:if test="${edasRights.target.Profile.writeable}">
               <iman:os typeFilter="Profile" control="_Profile" history="true"/>
               <div id="profileInstructions" class="instructions">
               	<iman:string key="Profile.RightsNotice"/>
               </div>
            </c:if>
         </TD>
         <TD valign="top">
            <c:set var="mode"><x:out select="$edasXml/edas/Profile/@mode"/></c:set>
            <iman:mooMode name="_Profile_mode" value="${mode}" multi="false" />
         </TD>
      </TR>
      <TR><TD height="9"></TD></TR>
   </TABLE>



</FORM>
<iman:osFooter />
</BODY>
</HTML>
