]> SALOME platform Git repositories - tools/siman.git/blob - Workspace/Siman/WebContent/study/newStudy.jsp
Salome HOME
newStudy includes copyStudy JSP now by means of tiles.
[tools/siman.git] / Workspace / Siman / WebContent / study / newStudy.jsp
1 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2     pageEncoding="ISO-8859-1"%>
3 <%@ taglib prefix="s" uri="/struts-tags"%>
4 <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
5 <tiles:importAttribute name="valid_action" scope="request"/>
6
7 <script language="JavaScript">
8     function initialize() {
9         create.elements[0].focus();
10     }
11
12     function setValue() {
13         var select = create.projectContextId.value; // contextValue select input
14         if (select == "0") { // Creation of a new context type
15             tds = document.getElementById("select");
16             tde = document.getElementById("enter");
17             tds.style.display = "none"; // Hides the select input
18             tde.style.display = "block"; // Displays the text input
19         }
20         create.projectContext.focus();
21     }
22     
23     $(document).ready(function () {
24         create.projectContextId.value = <s:property value="projectContextId"/>;
25         setValue();
26     });
27 </script>
28
29 <!-- New study dialog
30      ===========================================================================
31   -->
32 <div id="article-box">
33     <div id="section">
34         <s:text name="title.newstudy" />
35     </div>
36     <div id="top-spacer"></div>
37     <form id="create" name="create" action="<tiles:getAsString name="input_action"/>" method="post">
38         <table class="text">
39
40             <tr class="error">
41                 <td colspan="3"><s:text name="%{error}" /></td>
42             </tr>
43
44             <tr>
45                 <td>&nbsp;<s:text name="field.studytitle" />*:&nbsp;
46                 </td>
47                 <td><s:textfield theme="simple" size="60" name="title" /></td>
48             </tr>
49
50             <tr>
51                 <td>&nbsp;<s:text name="field.product" />*:&nbsp;
52                 </td>
53                 <s:if test="projectContextValues.size > 0">
54                     <td id="select"><select name="projectContextId"
55                         style="width: 214px" onChange="setValue()">
56                             <option value="-1">
57                                 <s:text name="menu.select" />
58                             </option>
59                             <option value="0">
60                                 &nbsp;
61                                 <s:text name="menu.newproduct" />
62                             </option>
63                             <optgroup label="&nbsp;<s:text name="label.products"/>">
64                                 <s:iterator value="projectContextValues">
65                                     <option value="<s:property value="index"/>">
66                                         &nbsp;
67                                         <s:property value="value" />
68                                     </option>
69                                 </s:iterator>
70                             </optgroup>
71                     </select></td>
72                     <td id="enter" style="display: none"><s:textfield
73                             theme="simple" size="30" name="projectContext" /></td>
74                 </s:if>
75                 <s:else>
76                     <td><s:hidden name="projectContextId" value="0" /> <s:textfield
77                             size="30" name="projectContext" /></td>
78                 </s:else>
79             </tr>
80                 <tiles:insertAttribute name="source_study" ignore="true" />
81             
82             <tr>
83                 <td align="right" colspan="2"><s:submit action="%{#request.valid_action}"
84                         theme="simple" type="button" key="button.newstudy" /></td>
85             </tr>
86
87         </table>
88     </form>
89     <div id="top-spacer"></div>
90 </div>
91
92 <!-- Reserved
93   -->
94 <div id="right-pane"></div>
95 <div id="bottom-spacer"></div>