<%@  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"); %>

<HTML>
<HEAD>
<TITLE><%= c.string("CreateUser.CreateUserTitle") %></TITLE>
<LINK href="<%= c.getModulesUrl() + "/dev/css/hf_style.css" %>" rel="styleSheet" type="text/css">
<jsp:include page='<%= c.getPath("dev/eMFrameScripts_inc.jsp") %>' flush="true" />
<jsp:include page='<%= c.getPath("dev/OSScripts_inc.jsp") %>' flush="true" />
<script language="JavaScript">

   function addOption(controlName, result)
   {
      alert("result = " + result);
   }

   function checkCreateAliasNullInput()
   {
      var strObjectInput = document.CreateAliasForm.CreateAliasObject.value;
      var strAliasNameInput = document.CreateAliasForm.CreateAliasName.value;
      var strContainerInput = document.CreateAliasForm.CreateAliasContext.value;

      if ((null == strObjectInput) || (0 == strObjectInput.length))
      {
         alert("<%= c.string("CreateAlias.InvalidObject") %>");
         return false;
      }
      if ((null == strContainerInput) || (0 == strContainerInput.length))
      {
         alert("<%= c.string("CreateUser.InvalidContext") %>");
         return false;
      }
      if ((null == strAliasNameInput) || (0 == strAliasNameInput.length))
      {
         alert("<%= c.string("CreateAlias.InvalidAliasName") %>");
         return false;
      }
      return true;
   }


   function setFocusToFormElement()
   {
      // added for Object View
      if ("<%= c.var("OS.ReturningToAnchor") %>"!="true")    //haven't entered a value from OS
      {
         document.CreateAliasForm.CreateAliasContext.value = "<%= c.toScript(eMFrameUtils.getSingleTarget(request)) %>";
      }

      document.CreateAliasForm.CreateAliasName.focus();
   }


</script>
</HEAD>

<BODY TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000" bgcolor="#FFFFFF" onLoad="setFocusToFormElement();returnFromOS();">
<form name="CreateAliasForm" method=post action="webacc" onSubmit="return(checkCreateAliasNullInput())">
   <input type=hidden name="taskId" value="<%= c.var("taskId") %>">
   <input type=hidden name="merge" value="dev.GenConf">
   <input type=hidden name="error" value="dev.GenErr">
   <input type=hidden name="User.context" value="<%= c.var("User.context") %>">
   <input type=hidden name="nextState" value="doCreateAlias">
   <input type=hidden name="SelectedClass" value="<%= c.var("SelectedClass") %>">
   <input type=hidden name="TranslatedClass" value="<%= c.var("TranslatedClass") %>">
   <input type=hidden name="GifName" value="<%= c.var("GifName") %>">
   <input type=hidden name="targetNames" value="<%= c.var("targetNames") %>">

   <% c.set("TaskHeader.title", c.formatMessage(c.string("Creator.Create"), new String[]{c.var("TranslatedClass")}));
      c.set("TaskHeader.iconUrl", c.plus("dir/", c.var("GifName")));

      c.set("TaskHeader.iconAlt", c.var("TranslatedClass")); %>
   <jsp:include page='<%= c.getPath("dev/TaskHeader_inc.jsp") %>' flush="true" />
   <BR>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="mediumtext" ><%= c.string("CreateAlias.AliasName") %></td>
  </tr>
  <tr>
    <td><input type=text name="CreateAliasName" value="" size=<%= c.string("UI.textboxSize") %> maxlength=64></td>
  </tr>
  <tr><td>&nbsp;</td></tr>
  <tr>
    <td class="mediumtext"><%= c.string("CreateAlias.AliasedObject") %></td>
  </tr>
  <tr>
    <td><input type=text name="CreateAliasObject" value="" size=<%= c.string("UI.textboxSize") %>>
    <% c.set("OS.TypeFilter", "*");
       c.set("OS.Control", "CreateAliasObject");
       c.set("OS.History", "true"); %>
    <jsp:include page='<%= c.getPath("dev/OS_inc.jsp") %>' flush="true" />
    </td>
  </tr>
  <tr><td>&nbsp;</td></tr>
  <tr>
    <td class="mediumtext"><%= c.string("CreateUser.Context") %></td>
  </tr>
  <tr>
    <td><input type=text name="CreateAliasContext" value="" size=<%= c.string("UI.textboxSize") %>>
    <% c.set("OS.TypeFilter", "[Containers],[Root]");
       c.set("OS.Control", "CreateAliasContext");
       c.set("OS.History", "true"); %>
    <jsp:include page='<%= c.getPath("dev/OS_inc.jsp") %>' flush="true" />
    </td>
  </tr>
</table><BR>

   <jsp:include page='<%= c.getPath("dev/Bar_inc.jsp") %>' flush="true" />
   <INPUT type=image name="Create" alt="<%= c.string("Button.Create.alt") %>" src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.OK.image") %>" border=0><jsp:include page='<%= c.getPath("dev/Cancel_inc.jsp") %>' flush="true" />
   </form>
<jsp:include page='<%= c.getPath("dev/OSFooter_inc.jsp") %>' flush="true" />
</BODY></HTML>
