source: branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/autogenerate.jsp @ 550

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

have restructured the code completely that writes the hybs section

File size: 5.4 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
17<html>
18<head>
19
20<link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/styles.css" />
21<link rel="stylesheet" type="text/css" href="/base/include/styles/main.css">
22<link rel="stylesheet" type="text/css" href="/base/include/styles/size_m.css">
23
24<script language="JavaScript" src="<%= request.getContextPath()%>/include/scripts/main.js" type="text/javascript"></script>
25<script language="JavaScript" type="text/javascript">
26
27//submits form
28  function submit()
29  {
30    document.autogenerate.submit();
31  }
32
33    //function to display or hide a given element
34    function showItems(myItem)
35    {
36       //this is the ID of the item to hide
37      var myItem = document.getElementById(myItem);
38         //items are currently hidden, so display them
39        myItem.style.display = "table-row";
40    }
41   
42    function hideItems(myItem)
43    {
44       //this is the ID of the item to hide
45      var myItem = document.getElementById(myItem);
46        //items are currently displayed, so hide them
47        myItem.style.display = "none";
48    }
49   
50    function failImport()
51    {
52      var cf = confirm('Sorry - this scenario is not supported.'+
53      '\nPlease click OK to return to the form or Cancel to cancel your import.');
54      if(cf==true)
55      {
56          //do nothing
57      }
58      else
59      {
60        window.close();
61      }
62    }
63
64</script>
65
66</head>
67<body>
68
69<h2>Tab2MAGE Import Wizard -- Additional Information for Autogenerate Mode</h2>
70<p>
71<form name="autogenerate" action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/submit.jsp?ID=<%=ID%>">
72<input type="hidden" name="ID" value="<%=ID%>"> 
73<input  type="hidden" name="requestId" value="<%=requestId%>">
74
75
76<table cellpadding="10" width="100%" >
77
78  <!-- rationale for sample pairing -->
79  <tr>
80    <td>What was the rationale for pairing samples?</td>
81    <td class="input">
82    <select name="samplePairing" >
83        <option>treated versus control</option>
84        <option>normal versus diseased</option>
85        <option onclick="failImport();">other</option>
86    </select>
87    </td>
88  </tr>
89
90
91  <!-- time course - yes or no? -->
92  <tr>
93    <td>Was the experiment a time course?</td>
94    <td class="input">
95
96    <table class="noBorder" cellpadding="4">
97      <tr>
98        <td class="noBorder"><input type="radio" id="timeCourseYes" name="timeCourse" value="yes" onclick="showItems('timeInputs1');showItems('timeInputs2');"></td>
99        <td class="noBorder">yes</td>
100      </tr>
101
102      <tr>
103        <td class="noBorder"><input type="radio" id="timeCourseNo" name="timeCourse" checked="checked" value="no" onclick="hideItems('timeInputs1');hideItems('timeInputs2');"></td>
104        <td class="noBorder">no</td>
105      </tr>
106    </table>
107
108    </td>
109  </tr>
110 
111 
112
113
114 
115  <!-- time points input -->
116 
117    <tr id="timeInputs1" style="display:none">
118    <td>Please enter a list of your time points here, separated by semicolons.<p>
119    Example: 0h;1h;12h;24h;
120    </td>
121    <td class="input">
122      <textarea name="timePoints"></textarea>
123    </td>
124  </tr>
125
126  <!--proceed - yes or no? -->
127  <tr id="timeInputs2" style="display:none">
128    <td>By default we assume a time based sample pairing between control and treatment groups. <p>
129    Is this the case?</td>
130    <td class="input">
131
132    <table class="noBorder" cellpadding="4">
133      <tr>
134        <td class="noBorder"><input type="radio" id="proceedYes" name="proceed" value="yes"></td>
135        <td class="noBorder">yes</td>
136      </tr>
137
138      <tr>
139        <td class="noBorder"><input type="radio" id="proceedNo" name="proceed" value="no" onclick="failImport();"></td>
140        <td class="noBorder">no</td>
141      </tr>
142    </table>
143
144    </td>
145  </tr>
146 
147  </table>
148 
149
150</form>
151
152<table align="center" class="noBorder" cellspacing="5" cellpadding="5">
153  <tr class="noBorder">
154    <td id="next" width="50%" style="border-style: none;">
155    <div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';" onclick="submit()">
156    <div class="buttons_inner">
157    <table class="noBorder" cellspacing="0" cellpadding="0">
158      <tr class="noBorder">
159        <td style="border-style: none;"><img src="/base/images/gonext.gif" border="0"></td>
160        <td style="border-style: none;">Next</td>
161      </tr>
162    </table>
163    </div>
164    </div>
165    </td>
166    <td id="close" width="50%" style="border-style: none;">
167    <div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';" onclick="window.close()">
168    <div class="buttons_inner">
169    <table class="noBorder" cellspacing="0" cellpadding="0">
170      <tr class="noBorder">
171        <td style="border-style: none;"><img src="/base/images/cancel.gif" border="0"></td>
172        <td style="border-style: none;">Cancel</td>
173      </tr>
174    </table>
175    </div>
176    </div>
177    </td>
178  </tr>
179</table>
180
181
182</body>
183</html>
Note: See TracBrowser for help on using the repository browser.