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" />
7 <script language="JavaScript">
8 function initialize() {
9 create.elements[0].focus();
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
20 create.projectContext.focus();
23 $(document).ready(function() {
24 <s:if test="projectContextValues.size > 0">
25 create.projectContextId.value = <s:property value="projectContextId"/>;
32 ===========================================================================
34 <div id="article-box">
36 <s:text name="title.newstudy" />
38 <div id="top-spacer"></div>
39 <form id="create" name="create"
40 action="<tiles:getAsString name="input_action"/>" method="post">
44 <td colspan="3"><s:text name="%{error}" /></td>
48 <td> <s:text name="field.studytitle" />*:
50 <td><s:textfield theme="simple" size="60" name="title" /></td>
54 <td> <s:text name="field.product" />*:
56 <s:if test="projectContextValues.size > 0">
57 <td id="select"><select name="projectContextId"
58 style="width: 214px" onChange="setValue()">
60 <s:text name="menu.select" />
64 <s:text name="menu.newproduct" />
66 <optgroup label=" <s:text name="label.products"/>">
67 <s:iterator value="projectContextValues">
68 <option value="<s:property value="index"/>">
70 <s:property value="value" />
75 <td id="enter" style="display: none"><s:textfield
76 theme="simple" size="30" name="projectContext" /></td>
79 <td><s:hidden name="projectContextId" value="0" /> <s:textfield
80 theme="simple" size="30" name="projectContext" /></td>
83 <tiles:insertAttribute name="source_study" ignore="true" />
86 <td align="right" colspan="2"><s:submit
87 action="%{#request.valid_action}" theme="simple" type="button"
88 key="button.newstudy" /></td>
93 <div id="top-spacer"></div>
98 <div id="right-pane"></div>
99 <div id="bottom-spacer"></div>