<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" import="com.novell.webaccess.common.JSPConduit"%>
<% JSPConduit c = new JSPConduit(request);  
   c.stringTable("DevResources");
   c.stringTable("FwResources");
   
%>

<%@ taglib uri="/WEB-INF/iman.tld" prefix="iman"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>
<%@ taglib uri="/WEB-INF/x.tld" prefix="x"%>
<iman:stringtable bundle="DevResources" />
<iman:stringtable bundle="FwResources" />

<%@page import="java.util.Set"%>
<%@page import="java.util.Iterator"%>
<%@page import="com.novell.emframe.fw.config.ModuleInfo"%>
<HTML>
<HEAD>


<script language="javascript">

 function installSelectedModules(spack)
{
	 var strUrl = "webacc?NPService=<%= c.var("taskId") %>&moduleaction=LicenseAgreement&selectedItems="+spack;
     window.location.href = strUrl;
 
}

function onDisagree(){

	var url = "webacc?NPService=<%= c.var("taskId") %>&moduleaction=LicenseDisagreement";
      window.location.href=url;
}

function onExit()
{
	document.pluginForm.submit();
}

</script>

<TITLE><iman:string key="ProductName" /></TITLE>
<LINK href="<c:out value='${ModulesPath}' />/dev/css/hf_style.css" rel="styleSheet" type="text/css">
<LINK href="<c:out value='${ModulesPath}' />/dev/css/hf_message.css" rel="styleSheet" type="text/css">
<iman:stylesheet />
<iman:eMFrameScripts />

</HEAD>

<BODY bgcolor="white">	

<form name="pluginForm" method="post" action="webacc">
 <input type=hidden name="NPService" value="<%= c.var("taskId" ) %>">
<%
Set availableSet=(Set)request.getAttribute("availableSet");
Set notavailableSet=(Set)request.getAttribute("notavailableSet");

if(availableSet!=null || notavailableSet!=null)
	out.println("<H2>The plug-in(s) you selected depend on following plug-in(s)</H2>");
for (Iterator iterator = availableSet.iterator(); iterator
.hasNext();) {
   ModuleInfo mInfo = (ModuleInfo) iterator.next();
   out.println(mInfo.getModuleTitle()+" (available)<br>");
}
for (Iterator iterator = notavailableSet.iterator(); iterator
.hasNext();) {
  String element= (String)iterator.next();
   out.println(element+" (not available)<br>");
}
%>


<iman:bar/>

<%
String sPackedModules=(String)request.getAttribute("selectedItems");
String all_dependencies=(String)request.getAttribute("moduledependencies");%>
<INPUT type="submit" onclick="javascript:installSelectedModules('<%= all_dependencies %>'); return false;" name="Install All" alt="Install All (Selected and its dependents)" title="Install All (Selected and its dependents)" value="Install All" style="background-color:#e0e0e0;">
<INPUT type="submit" onclick="javascript:installSelectedModules('<%= sPackedModules %>'); return false;" name="Install Selected" alt="Install Only Selected" title="Install Only Selected" value="Install Only Selected" style="background-color:#e0e0e0;">
<INPUT type="submit" onclick="javascript:onDisagree(); return false;" name="Cancel" alt="Cancel Installation" title="Cancel Installation" value="Cancel" style="background-color:#e0e0e0;">
</form>

</BODY>
</HTML>
