<%@  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");
   c.stringTable("BaseResources"); %>
<HTML>
<HEAD>
<TITLE><%= c.toDisplay(c.string("ModulesToInstall.CopyNPMFile")) %></TITLE>
<LINK   href="<%= c.getModulesUrl() + "/dev/css/hf_style.css" %>" rel="styleSheet" type="text/css">

<script language="JavaScript">


   function okSelected()
   {
      if(checkRequiredFields() == false)
      {
         return false;
      }

      var form = document.CopyModule;

      var sModuleToCopy = form.NPMFileName.value;
      var strUrl = "webacc?NPService=<%= c.var("taskId") %>&moduleaction=CopyModule&merge=ModulesToInstall&NPMFileName=" + sModuleToCopy;
      form.action = strUrl;
   }


   function checkRequiredFields()
   {
      var form = document.CopyModule;

      var fileName = form.NPMFileName.value;
      if ((fileName == null) || (fileName.length == 0))
      {
          alert("<%= c.toScript(c.string("ModulesToInstall.SelectFile")) %>");
          return false;
      }
      return true;
   }


   function enableTextBox()
   {
      var form = document.CopyModule;
      form.NPMFileName.disabled=false;
      return true;
   }



</SCRIPT>
</HEAD>

<BODY   TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000" bgcolor="#FFFFFF" onLoad="enableTextBox()" >
<form   name="CopyModule" method="post" onSubmit="return(okSelected());" action="webacc" enctype="multipart/form-data">


   <% c.set("TaskHeader.title", c.string("ModulesToInstall.CopyNPMFile"));
   c.set("TaskHeader.iconUrl", "dir/File.gif"); %>
   <jsp:include page='<%= c.getPath("dev/TaskHeader_inc.jsp") %>' flush="true" />


   <table border="0" cellspacing="2" cellpadding="2" width="90%">
      <tr valign="baseline">
         <td height="16" colspan="7" align="center" valign="middle" class="instructions">
            <div align="left"><%= c.toDisplay(c.string("ModulesToInstall.CopyModuleDesc")) %></div>
         </td>
      </tr>
      <tr valign="baseline">
         <td height="16" colspan="5" align="center" valign="middle" class="mediumtext">
            &nbsp;
         </td>
      </tr>
   </table>

   <table border="0" cellspacing="0" cellpadding="2">
      <tr valign="baseline">
        <td>
          <%= c.toDisplay(c.string("ModulesToInstall.NMPFileLabel")) %>
         </td>
         <td class="mediumtext">
            <input  type="file" name="NPMFileName" size=<%= c.string("UI.textboxSize") %> accept="text/xml" />
         </td>
      </tr>
   </table>

   <br>
   <jsp:include page='<%= c.getPath("dev/Bar_inc.jsp") %>' flush="true" />
   <INPUT type="image" name="OK" 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" />

</form>
</BODY></HTML>

