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

<%   JSPConduit c = JSPConduit.getJSPConduit(request);
   c.stringTable("DevResources");
   c.stringTable("FwResources"); %>

<HTML>
<HEAD>
<TITLE><%= c.string("RoleRightsReportTaskDisplayName") %></TITLE>
<link   rel='stylesheet' href='<%= c.getModulesUrl() + "/dev/css/hf_style.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 HEADER *
    *******************/
   function onPageSubmit()
   {
      var numOptions = document.GetRightsForRoleForm.RoleListSelect.length;
      if(numOptions == 0)
      {
         return false;
      }

      return true;
   }

</script>
</HEAD>

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

<form   name="GetRightsForRoleForm"
        method=post
        action="webacc"
        onSubmit="return(onPageSubmit())">

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

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

        <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="getRoleRightsReport">

   <% c.set("TaskHeader.title", c.string("RoleRightsReport.ReportHeader"));
      c.set("TaskHeader.helpFile", "fw/getrightsforroleform.html");
      c.set("TaskHeader.iconUrl", "dev/bullet_default_16.gif"); %>
   <jsp:include page='<%= c.getPath("dev/TaskHeader_inc.jsp") %>' flush="true" />

   <div class="formdescriptextml0"  style="width: 70%"><%= c.toHTML(c.string("RoleRightsReport.Instructions")) %></div>
   <div class="mediumtext" style="margin-top: 1em;"><%= c.toHTML(c.string("UsersToRoleReport.RolePrompt")) %></div>

   <div>
      <select name="RoleListSelect">
      <%
         ArrayList roleList = (ArrayList)request.getAttribute( "roleData");
         if((roleList != null) || (roleList.size() > 0))
         {
            for(int i = 0; i < roleList.size(); i++)
            {
               String[] roleInfo = (String[])roleList.get(i);%>
               <option value="<%=roleInfo[1]%>"><%=roleInfo[0]%> </option>
            <%
            }
         } %>
      </select>
    </div>

      <div class="margintop3">
         <jsp:include page='<%= c.getPath("dev/Bar_inc.jsp") %>' flush="true" />
         <% if (c.var("inProgress").equals("true")) { %>
         <a href="webacc?taskId=<%= c.var("taskId") %>&merge=fw.GetRightsForRoleForm&nextState=cancel&User.context=<%= c.var("User.context") %>">
            <IMG name="Cancel" alt="<%= c.string("Button.Cancel.alt") %>" title="<%= c.string("Button.Cancel.alt") %>" src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.Cancel.image") %>" border=0></a>
         <% } else { %>
            <input   type=image
               name="OKButton"
               alt="<%= c.string("Button.OK.alt") %>"
               src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.OK.image") %>"
               border=0>
               <jsp:include page='<%= c.getPath("dev/Cancel_inc.jsp") %>' flush="true" />
         <% } %>
		</div>
</form>
<jsp:include page='<%= c.getPath("dev/OSFooter_inc.jsp") %>' flush="true" />
</BODY></HTML>
