source: branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/userchoice3.jsp @ 552

Last change on this file since 552 was 552, checked in by mbayer, 13 years ago

have added input validation (mandatory fields check)
added back buttons
disabled autogenerate mode for now
included a pooling protocols.jsp
rejigged configureImporter.jsp so that it no longer submits directly but rather thorugh submit.jsp like all other routes

File size: 4.3 KB
Line 
1<%@ page import="net.sf.basedb.core.*"%>
2<%@ page import="net.sf.basedb.clients.web.*"%>
3<%@ page import="net.sf.basedb.util.*"%>
4<%@ page import="java.util.*"%>
5
6<jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="session"/>
7<!-- submits the form data back to the bean assuming that each form element is matched to a variable in the bean by the same name -->
8<jsp:setProperty name="inputDataBean" property="*"/>
9
10<%
11final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
12final String ID = sc.getId();
13final String requestId = request.getParameter("requestId");
14 %>
15 
16<html>
17<head>
18
19<link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/styles.css" />
20<link rel="stylesheet" type="text/css" href="/base/include/styles/main.css">
21<link rel="stylesheet" type="text/css" href="/base/include/styles/size_m.css">
22
23<script language="JavaScript" src="<%= request.getContextPath()%>/include/scripts/main.js" type="text/javascript"></script>
24<script language="JavaScript" type="text/javascript">
25
26//submits form
27function submit()
28{
29
30  //set the action value of the form according to what the user chose in the form
31  var form =document.getElementById("mappingsMode");
32 
33  if(document.getElementById("mappingsModeManual").checked)
34  {
35    form.action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/mappings.jsp?ID=<%=ID%>";
36  }
37  if(document.getElementById("mappingsModePaste").checked)
38  {
39    form.action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/spreadsheetdata.jsp?ID=<%=ID%>";
40  }
41
42  //check that a value has been selected
43  if (!document.getElementById("mappingsModeManual").checked &&
44  !document.getElementById("mappingsModePaste").checked)
45  {
46      alert('You must choose a value before proceeding.');
47  }
48  else
49  {
50    form.submit();
51  }
52}
53
54</script>
55
56</head>
57<body>
58
59<h2>Tab2MAGE Import Wizard -- Choose Mappings Mode</h2>
60<p>
61
62<form name="mappingsMode" id="mappingsMode" action="">
63
64<input type="hidden" name="ID" value="<%=ID%>"> 
65<input type="hidden"name="requestId" value="<%=requestId%>"> 
66
67<table cellpadding="10">
68  <tr>
69    <td>Please indicate how you would like to provide the mappings between file names, samples and factor value combinations:</td>
70    <td class="input">
71
72    <table class="noBorder" cellpadding="4">
73
74      <tr>
75        <td class="noBorder"><input type="radio" id="mappingsModeManual" name="mappingsMode" value="manualSelect" ></td>
76        <td class="noBorder">manually configure the mappings using a table with drop down boxes</td>
77      </tr>
78
79      <tr>
80        <td class="noBorder" colspan="2">OR</td>
81      </tr>
82
83      <tr>
84        <td class="noBorder"><input type="radio" id="mappingsModePaste" name="mappingsMode" value="copyPaste" ></td>
85        <td class="noBorder">copy and paste a block of existing mappings from a spreadsheet</td>
86      </tr>
87    </table>
88
89
90    </td>
91  </tr>
92</table>
93
94</form>
95
96
97  <table align="center" class="noBorder" cellspacing="5"  cellpadding="5">
98  <tr class="noBorder">
99    <td id="back"  style="border-style: none;"><div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';" onclick="back()"><div class="buttons_inner"><table  class="noBorder" cellspacing="0" cellpadding="0"><tr  class="noBorder"><td style="border-style: none;"><img src="/base/images/goback.gif" border="0"></td><td style="border-style: none;">Back</td></tr></table></div></div></td> 
100    <td id="next"  style="border-style: none;"><div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';" onclick="submit()"><div class="buttons_inner"><table  class="noBorder" cellspacing="0" cellpadding="0"><tr  class="noBorder"><td style="border-style: none;"><img src="/base/images/gonext.gif" border="0"></td><td style="border-style: none;">Next</td></tr></table></div></div></td>
101    <td id="close"  style="border-style: none;"><div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';" onclick="window.close()"><div class="buttons_inner"><table  class="noBorder" cellspacing="0" cellpadding="0"><tr  class="noBorder"><td style="border-style: none;"><img src="/base/images/cancel.gif" border="0"></td><td style="border-style: none;">Cancel</td></tr></table></div></div></td> 
102  </tr>
103  </table>
104
105</body>
106</html>
Note: See TracBrowser for help on using the repository browser.