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

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

<HTML>
<HEAD>
<TITLE><%= c.string("TaskstoUserReportTaskDisplayName") %></TITLE>
<% if (c.var("inProgress").equals("true")) { %>
   <META HTTP-EQUIV="Refresh" CONTENT="1">
<% } %>
<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 onPageLoad()
    {
        document.GetTasksUserNameForm.SelectedUserFDN.focus();
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function onPageSubmit()
    {
        var form = document.GetTasksUserNameForm;
        var strInput = form.SelectedUserFDN.value;
        if ((null == strInput) || (0 == strInput.length))
        {
            alert("<%= c.string("RolesToUserReport.EnterValidUserName") %>");
            form.SelectedUserFDN.focus();
            return false;
        }

        return true;
    }

</script>
</HEAD>

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

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

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

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

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

   <% c.set("TaskHeader.title", c.string("TasksToUserReport.ReportHeader"));
      c.set("TaskHeader.helpFile", "fw/gettasksusernameform.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("TasksToUserReport.Instructions")) %></div>
   <div class="mediumtext" style="margin-top: 1em;"><%= c.toHTML(c.string("RolesToUserReport.UserPrompt")) %></div>

   <div>
      <input type=text name="SelectedUserFDN" value="<%= c.var("SelectedUserFDN") %>" size=35>
               <% c.set("OS.TypeFilter", "User");
                  c.set("OS.Mode", "Browse");
                  c.set("OS.Control", "SelectedUserFDN");
                  c.set("OS.History", "true"); %>
               <jsp:include page='<%= c.getPath("dev/OS_inc.jsp") %>' flush="true" />
    </div>
      <% if (c.var("inProgress").equals("true")) { %>
         <div id="generate" style="display: block">
            <div class="head4" style="margin-bottom: 0.5em;  margin-top: 2em">
               <img height="32" width="32" src="<%= c.getModulesUrl() %>/dev/images/In-progress_framed32.gif" align="absmiddle"> <span class="typegold1">"<%= c.toHTML(c.string("RolesToUserReport.Generating")) %>"</span>
                  <b>"<%= c.toHTML(c.string("TaskstoUserReportTaskDisplayName")) %>"</b></div>
            <div class="mediumtext" style="margin-left: 3em; margin-bottom: 2em; margin-top: 2em; width: 350px"><%= c.toHTML(c.var("progressMessage")) %></div>
            <div class="mediumtext" style="margin-left: 3em; margin-bottom: 2em; width: 350px">"<%= c.toHTML(c.string("RolesToUserReport.CancelReport")) %>"</div>
         </div>
      <% } %>

      <% if (c.var("progressCancelled").equals("true")) { %>
         <div id="cancel" style="display: block">
            <div class="head4" style="margin-bottom: 0.5em;  margin-top: 2em">
               <img height="32" width="32" src="<%= c.getModulesUrl() %>/dev/images/cancelled32.gif" align="absmiddle"> <span class="typegold1">"<%= c.toHTML(c.string("RolesToUserReport.Cancelled")) %>"</span>
                  <b>"<%= c.toHTML(c.string("TaskstoUserReportTaskDisplayName")) %>"</b></div>
            <div class="mediumtext" style="margin-left: 3em; margin-bottom: 2em; width: 350px">"<%= c.toHTML(c.string("RolesToUserReport.CancelledMessage")) %>"</div>
         </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.GetTasksUserNameForm&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>
