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.edit.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 | <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span> |
---|
15 | </div> |
---|
16 | <div class="body"> |
---|
17 | <h1><g:message code="default.edit.label" args="[entityName]" /></h1> |
---|
18 | <g:if test="${flash.message}"> |
---|
19 | <div class="message">${flash.message}</div> |
---|
20 | </g:if> |
---|
21 | <g:hasErrors bean="${studyInstance}"> |
---|
22 | <div class="errors"> |
---|
23 | <g:renderErrors bean="${studyInstance}" as="list" /> |
---|
24 | </div> |
---|
25 | </g:hasErrors> |
---|
26 | <g:form method="post" > |
---|
27 | <g:hiddenField name="id" value="${studyInstance?.id}" /> |
---|
28 | <g:hiddenField name="version" value="${studyInstance?.version}" /> |
---|
29 | <div class="dialog"> |
---|
30 | <table> |
---|
31 | <tbody> |
---|
32 | |
---|
33 | <tr class="prop"> |
---|
34 | <td valign="top" class="name"> |
---|
35 | <label for="template"><g:message code="study.template.label" default="Template" /></label> |
---|
36 | </td> |
---|
37 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'template', 'errors')}"> |
---|
38 | <g:select name="template.id" from="${dbnp.studycapturing.Template.list()}" optionKey="id" value="${studyInstance?.template?.id}" noSelection="['null': '']" /> |
---|
39 | </td> |
---|
40 | </tr> |
---|
41 | |
---|
42 | <tr class="prop"> |
---|
43 | <td valign="top" class="name"> |
---|
44 | <label for="startDate"><g:message code="study.startDate.label" default="Start Date" /></label> |
---|
45 | </td> |
---|
46 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'startDate', 'errors')}"> |
---|
47 | <g:datePicker name="startDate" precision="day" value="${studyInstance?.startDate}" /> |
---|
48 | </td> |
---|
49 | </tr> |
---|
50 | |
---|
51 | <tr class="prop"> |
---|
52 | <td valign="top" class="name"> |
---|
53 | <label for="samplingEvents"><g:message code="study.samplingEvents.label" default="Sampling Events" /></label> |
---|
54 | </td> |
---|
55 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'samplingEvents', 'errors')}"> |
---|
56 | <g:select name="samplingEvents" from="${dbnp.studycapturing.SamplingEvent.list()}" multiple="yes" optionKey="id" size="5" value="${studyInstance?.samplingEvents}" /> |
---|
57 | </td> |
---|
58 | </tr> |
---|
59 | |
---|
60 | <tr class="prop"> |
---|
61 | <td valign="top" class="name"> |
---|
62 | <label for="subjects"><g:message code="study.subjects.label" default="Subjects" /></label> |
---|
63 | </td> |
---|
64 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'subjects', 'errors')}"> |
---|
65 | <g:select name="subjects" from="${dbnp.studycapturing.Subject.list()}" multiple="yes" optionKey="id" size="5" value="${studyInstance?.subjects}" /> |
---|
66 | </td> |
---|
67 | </tr> |
---|
68 | |
---|
69 | <tr class="prop"> |
---|
70 | <td valign="top" class="name"> |
---|
71 | <label for="events"><g:message code="study.events.label" default="Events" /></label> |
---|
72 | </td> |
---|
73 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'events', 'errors')}"> |
---|
74 | <g:select name="events" from="${dbnp.studycapturing.Event.list()}" multiple="yes" optionKey="id" size="5" value="${studyInstance?.events}" /> |
---|
75 | </td> |
---|
76 | </tr> |
---|
77 | |
---|
78 | <tr class="prop"> |
---|
79 | <td valign="top" class="name"> |
---|
80 | <label for="lastUpdated"><g:message code="study.lastUpdated.label" default="Last Updated" /></label> |
---|
81 | </td> |
---|
82 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'lastUpdated', 'errors')}"> |
---|
83 | <g:datePicker name="lastUpdated" precision="day" value="${studyInstance?.lastUpdated}" /> |
---|
84 | </td> |
---|
85 | </tr> |
---|
86 | |
---|
87 | <tr class="prop"> |
---|
88 | <td valign="top" class="name"> |
---|
89 | <label for="readers"><g:message code="study.readers.label" default="Readers" /></label> |
---|
90 | </td> |
---|
91 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'readers', 'errors')}"> |
---|
92 | <g:select name="readers" from="${nimble.User.list()}" multiple="yes" optionKey="id" size="5" value="${studyInstance?.readers}" /> |
---|
93 | </td> |
---|
94 | </tr> |
---|
95 | |
---|
96 | <tr class="prop"> |
---|
97 | <td valign="top" class="name"> |
---|
98 | <label for="code"><g:message code="study.code.label" default="Code" /></label> |
---|
99 | </td> |
---|
100 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'code', 'errors')}"> |
---|
101 | <g:textField name="code" value="${studyInstance?.code}" /> |
---|
102 | </td> |
---|
103 | </tr> |
---|
104 | |
---|
105 | <tr class="prop"> |
---|
106 | <td valign="top" class="name"> |
---|
107 | <label for="editors"><g:message code="study.editors.label" default="Editors" /></label> |
---|
108 | </td> |
---|
109 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'editors', 'errors')}"> |
---|
110 | <g:select name="editors" from="${nimble.User.list()}" multiple="yes" optionKey="id" size="5" value="${studyInstance?.editors}" /> |
---|
111 | </td> |
---|
112 | </tr> |
---|
113 | |
---|
114 | <tr class="prop"> |
---|
115 | <td valign="top" class="name"> |
---|
116 | <label for="ecCode"><g:message code="study.ecCode.label" default="Ec Code" /></label> |
---|
117 | </td> |
---|
118 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'ecCode', 'errors')}"> |
---|
119 | <g:textField name="ecCode" value="${studyInstance?.ecCode}" /> |
---|
120 | </td> |
---|
121 | </tr> |
---|
122 | |
---|
123 | <tr class="prop"> |
---|
124 | <td valign="top" class="name"> |
---|
125 | <label for="researchQuestion"><g:message code="study.researchQuestion.label" default="Research Question" /></label> |
---|
126 | </td> |
---|
127 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'researchQuestion', 'errors')}"> |
---|
128 | <g:textField name="researchQuestion" value="${studyInstance?.researchQuestion}" /> |
---|
129 | </td> |
---|
130 | </tr> |
---|
131 | |
---|
132 | <tr class="prop"> |
---|
133 | <td valign="top" class="name"> |
---|
134 | <label for="title"><g:message code="study.title.label" default="Title" /></label> |
---|
135 | </td> |
---|
136 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'title', 'errors')}"> |
---|
137 | <g:textField name="title" value="${studyInstance?.title}" /> |
---|
138 | </td> |
---|
139 | </tr> |
---|
140 | |
---|
141 | <tr class="prop"> |
---|
142 | <td valign="top" class="name"> |
---|
143 | <label for="description"><g:message code="study.description.label" default="Description" /></label> |
---|
144 | </td> |
---|
145 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'description', 'errors')}"> |
---|
146 | <g:textField name="description" value="${studyInstance?.description}" /> |
---|
147 | </td> |
---|
148 | </tr> |
---|
149 | |
---|
150 | <tr class="prop"> |
---|
151 | <td valign="top" class="name"> |
---|
152 | <label for="owner"><g:message code="study.owner.label" default="Owner" /></label> |
---|
153 | </td> |
---|
154 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'owner', 'errors')}"> |
---|
155 | <g:select name="owner.id" from="${nimble.User.list()}" optionKey="id" value="${studyInstance?.owner?.id}" /> |
---|
156 | </td> |
---|
157 | </tr> |
---|
158 | |
---|
159 | <tr class="prop"> |
---|
160 | <td valign="top" class="name"> |
---|
161 | <label for="dateCreated"><g:message code="study.dateCreated.label" default="Date Created" /></label> |
---|
162 | </td> |
---|
163 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'dateCreated', 'errors')}"> |
---|
164 | <g:datePicker name="dateCreated" precision="day" value="${studyInstance?.dateCreated}" /> |
---|
165 | </td> |
---|
166 | </tr> |
---|
167 | |
---|
168 | <tr class="prop"> |
---|
169 | <td valign="top" class="name"> |
---|
170 | <label for="groups"><g:message code="study.groups.label" default="Groups" /></label> |
---|
171 | </td> |
---|
172 | <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'groups', 'errors')}"> |
---|
173 | <g:select name="groups" from="${dbnp.studycapturing.SubjectGroup.list()}" multiple="yes" optionKey="id" size="5" value="${studyInstance?.groups}" /> |
---|
174 | </td> |
---|
175 | </tr> |
---|
176 | |
---|
177 | </tbody> |
---|
178 | </table> |
---|
179 | </div> |
---|
180 | <div class="buttons"> |
---|
181 | <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span> |
---|
182 | <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span> |
---|
183 | </div> |
---|
184 | </g:form> |
---|
185 | </div> |
---|
186 | </body> |
---|
187 | </html> |
---|