source: trunk/grails-app/views/study/create.gsp @ 148

Last change on this file since 148 was 139, checked in by keesvb, 14 years ago

changed domain model for events and protocol parameters, and for template field storage, added NuGO PPS3 events, added searchable plugin for full text queries, corrected a few HTML errors in create study

File size: 7.7 KB
Line 
1
2<%@ page import="dbnp.studycapturing.Study" %>
3<html>
4    <head>
5        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6        <meta name="layout" content="main" />
7        <g:set var="entityName" value="${message(code: 'study.label', default: 'Study')}" />
8        <title><g:message code="default.create.label" args="[entityName]" /></title>
9    </head>
10    <body>
11        <div class="nav">
12            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Home</a></span>
13            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
14        </div>
15        <div class="body">
16            <h1><g:message code="default.create.label" args="[entityName]" /></h1>
17            <g:if test="${flash.message}">
18            <div class="message">${flash.message}</div>
19            </g:if>
20            <g:hasErrors bean="${studyInstance}">
21            <div class="errors">
22                <g:renderErrors bean="${studyInstance}" as="list" />
23            </div>
24            </g:hasErrors>
25            <g:form action="save" method="post" >
26                <div class="dialog">
27                    <table>
28                        <tbody>
29                       
30                            <tr class="prop">
31                                <td valign="top" class="name">
32                                    <label for="template.id"><g:message code="study.template.label" default="Template" /></label>
33                                </td>
34                                <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'template', 'errors')}">
35                                    <g:select name="template.id" from="${dbnp.studycapturing.Template.list()}" optionKey="id" value="${studyInstance?.template?.id}" noSelection="['null': '']" />
36                                </td>
37                            </tr>
38                       
39                            <tr class="prop">
40                                <td valign="top" class="name">
41                                    <label for="startDate"><g:message code="study.startDate.label" default="Start Date" /></label>
42                                </td>
43                                <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'startDate', 'errors')}">
44                                    <g:datePicker name="startDate" precision="day" value="${studyInstance?.startDate}"  />
45                                </td>
46                            </tr>
47                       
48                            <tr class="prop">
49                                <td valign="top" class="name">
50                                    <label for="lastUpdated"><g:message code="study.lastUpdated.label" default="Last Updated" /></label>
51                                </td>
52                                <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'lastUpdated', 'errors')}">
53                                    <g:datePicker name="lastUpdated" precision="day" value="${studyInstance?.lastUpdated}"  />
54                                </td>
55                            </tr>
56                       
57                            <tr class="prop">
58                                <td valign="top" class="name">
59                                    <label for="code"><g:message code="study.code.label" default="Code" /></label>
60                                </td>
61                                <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'code', 'errors')}">
62                                    <g:textField name="code" value="${studyInstance?.code}" />
63                                </td>
64                            </tr>
65                       
66                            <tr class="prop">
67                                <td valign="top" class="name">
68                                    <label for="ecCode"><g:message code="study.ecCode.label" default="Ec Code" /></label>
69                                </td>
70                                <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'ecCode', 'errors')}">
71                                    <g:textField name="ecCode" value="${studyInstance?.ecCode}" />
72                                </td>
73                            </tr>
74                       
75                            <tr class="prop">
76                                <td valign="top" class="name">
77                                    <label for="researchQuestion"><g:message code="study.researchQuestion.label" default="Research Question" /></label>
78                                </td>
79                                <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'researchQuestion', 'errors')}">
80                                    <g:textField name="researchQuestion" value="${studyInstance?.researchQuestion}" />
81                                </td>
82                            </tr>
83                       
84                            <tr class="prop">
85                                <td valign="top" class="name">
86                                    <label for="title"><g:message code="study.title.label" default="Title" /></label>
87                                </td>
88                                <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'title', 'errors')}">
89                                    <g:textField name="title" value="${studyInstance?.title}" />
90                                </td>
91                            </tr>
92                       
93                            <tr class="prop">
94                                <td valign="top" class="name">
95                                    <label for="description"><g:message code="study.description.label" default="Description" /></label>
96                                </td>
97                                <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'description', 'errors')}">
98                                    <g:textField name="description" value="${studyInstance?.description}" />
99                                </td>
100                            </tr>
101                       
102                            <tr class="prop">
103                                <td valign="top" class="name">
104                                    <label for="owner.id"><g:message code="study.owner.label" default="Owner" /></label>
105                                </td>
106                                <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'owner', 'errors')}">
107                                    <g:select name="owner.id" from="${nimble.User.list()}" optionKey="id" value="${studyInstance?.owner?.id}"  />
108                                </td>
109                            </tr>
110                       
111                            <tr class="prop">
112                                <td valign="top" class="name">
113                                    <label for="dateCreated"><g:message code="study.dateCreated.label" default="Date Created" /></label>
114                                </td>
115                                <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'dateCreated', 'errors')}">
116                                    <g:datePicker name="dateCreated" precision="day" value="${studyInstance?.dateCreated}"  />
117                                </td>
118                            </tr>
119                       
120                        </tbody>
121                    </table>
122                </div>
123                <div class="buttons">
124                    <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
125                </div>
126            </g:form>
127        </div>
128    </body>
129</html>
Note: See TracBrowser for help on using the repository browser.