<%@  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("FwResources"); %>
<HTML>
<HEAD>
<TITLE><%= c.toHTML(c.string("")) %></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" />
<style>
.gray
{
background-color: #bfbfbf;
}
</style>
<SCRIPT language="JavaScript">


   /*******************
    * FUNCTION HEADER *
    *******************/
    function onPageLoad()
    {
        document.CreateCategoryTaskForm.CategoryName.focus();
    }

   /*******************
    * FUNCTION HEADER *
    *******************/
    function onPageSubmit()
    {
        var form = document.CreateCategoryTaskForm;
        var strCategoryName = document.CreateCategoryTaskForm.CategoryName.value;

        if ((null == strCategoryName) || (0 == strCategoryName.length))
        {
            alert("<%= c.toScript(c.string("CreateCategory.InvalidCategoryName")) %>");
            document.CreateCategoryTaskForm.CategoryName.focus();
            return false;
        }

         //	Make sure they haven't entered more than 1024 characters.
         var sizeOk = checkFinalTextAreaSize();
         if (sizeOk == false)
         {
            document.CreateCategoryTaskForm.CategoryDescription.focus();
            return false;
         }

        return true;
    }

   // Check to make sure the description attribute max size is not exceeded.
   function checkFinalTextAreaSize()
   {
      var maxlimit = 1024;

      if (document.CreateCategoryTaskForm.CategoryDescription.value.length > maxlimit) // if too long...trim it!
      {
         var limitMessage = "<%= c.toScript(c.string("ModifyRBSObjectDescription.ExceededLimit")) %>";
         alert(limitMessage);
         document.CreateCategoryTaskForm.CategoryDescription.value = document.CreateCategoryTaskForm.CategoryDescription.value.substring(0, maxlimit);
         return false;
      }
      else
      {
         return true;
      }
   }


</SCRIPT>
</HEAD>

<BODY   TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000" bgcolor="#FFFFFF"
        onLoad="returnFromOS();onPageLoad();">

<FORM   name="CreateCategoryTaskForm"
        method=post
        action="webacc"
        onSubmit="return(onPageSubmit())">

   <input   type=hidden
            name="taskId"
            value="<%= c.var("taskId") %>">

   <input   type=hidden
            name="merge"
            value="fw.CategoryRole">

   <input   type=hidden
            name="error"
            value="dev.GenErr">

   <input   type=hidden
            name="nextState"
            value="nextRoleSelection">

   <!-- End of hidden tags -->

    <% c.set("WizardHeader.title", c.toHTML(c.string("CreateCategory.WizardTitle")));
       c.set("WizardHeader.subtitle", c.toHTML(c.string("General.Step1")));
       c.set("WizardHeader.instruction", c.toHTML(c.string("CreateCategory.Name")));
       c.set("WizardHeader.helpFile", ""); %>
    <jsp:include page='<%= c.getPath("dev/WizardHeader_inc.jsp") %>' flush="true" />

    <div class="formdescriptext"><span class="width400"><%= c.toHTML(c.string("CreateCategory.Instruction")) %></span></div>
    <br>
    <TABLE width="100%" border="0" cellspacing="0" cellpadding="3">
        <TR>
            <TD class="mediumtext" width="48%" valign="bottom">
                <%= c.toHTML(c.string("CreateCategory.CategoryName")) %><br>
                <input type=text name="CategoryName" value="<%= c.toHTML(c.var("CategoryName")) %>" size=35 maxlength=64>
            </TD>
            <TD width="2%" bgcolor="#FFFFFF">
                &nbsp;
            </TD>
            <TD width="50%" bgcolor="#FFFFFF" class="instructions">
                <%= c.toHTML(c.string("CreateCategory.Example")) %>
             </TD>
        </TR>
        <TR>
            <TD class="mediumtext" width="48%" valign="bottom">
                <%= c.toHTML(c.string("RBS.CollectionColon")) %><br>
               <input class="gray" type="text" name="CategoryCollectionFDN" value="<%= c.toHTML(c.var("CategoryCollectionFDN")) %>" size="35" readonly>
            </TD>
            <TD width="2%" bgcolor="#FFFFFF">
                &nbsp;
            </TD>
            <TD width="50%" bgcolor="#FFFFFF" class="instructions">
                <%= c.toHTML(c.string("CreateCategory.EnterPath")) %>
            </TD>
        </TR>
        <TR>
            <TD class="mediumtext" width="48%" valign="bottom">
                <%= c.toHTML(c.string("CreateCategory.Description")) %><br>
                <TEXTAREA name="CategoryDescription" value="<%= c.toHTML(c.var("CategoryDescription")) %>" rows="3" cols=30 wrap="VIRTUAL" ><%= c.toHTML(c.var("CategoryDescription")) %></TEXTAREA>
            </TD>
            <TD width="2%">
                &nbsp;
            </TD>
            <TD width="50%">
                &nbsp;
            </TD>
        </TR>
        <TR>
            <TD width="48%">&nbsp;</TD>
            <TD width="2%">&nbsp;</TD>
            <TD width="50%">&nbsp;</TD>
        </TR>
    </TABLE>
    <jsp:include page='<%= c.getPath("dev/Bar_inc.jsp") %>' flush="true" />
    <a href="#"><IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.BackDisabled.image") %>" alt="<%= c.toHTML(c.string("Button.BackDisabled.alt")) %>" title="<%= c.toHTML(c.string("Button.BackDisabled.alt")) %>" border=0></a>
    <INPUT type=image name="Next" alt="<%= c.toHTML(c.string("Button.Next.alt")) %>" src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.Next.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>
