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 create.projectContextId.value = <s:property value="projectContextId"/>;
30 ===========================================================================
32 <div id="article-box">
34 <s:text name="title.newstudy" />
36 <div id="top-spacer"></div>
37 <form id="create" name="create" action="<tiles:getAsString name="input_action"/>" method="post">
41 <td colspan="3"><s:text name="%{error}" /></td>
45 <td> <s:text name="field.studytitle" />*:
47 <td><s:textfield theme="simple" size="60" name="title" /></td>
51 <td> <s:text name="field.product" />*:
53 <s:if test="projectContextValues.size > 0">
54 <td id="select"><select name="projectContextId"
55 style="width: 214px" onChange="setValue()">
57 <s:text name="menu.select" />
61 <s:text name="menu.newproduct" />
63 <optgroup label=" <s:text name="label.products"/>">
64 <s:iterator value="projectContextValues">
65 <option value="<s:property value="index"/>">
67 <s:property value="value" />
72 <td id="enter" style="display: none"><s:textfield
73 theme="simple" size="30" name="projectContext" /></td>
76 <td><s:hidden name="projectContextId" value="0" /> <s:textfield
77 size="30" name="projectContext" /></td>
80 <tiles:insertAttribute name="source_study" ignore="true" />
83 <td align="right" colspan="2"><s:submit action="%{#request.valid_action}"
84 theme="simple" type="button" key="button.newstudy" /></td>
89 <div id="top-spacer"></div>
94 <div id="right-pane"></div>
95 <div id="bottom-spacer"></div>