1 | |
---|
2 | |
---|
3 | <html> |
---|
4 | <head> |
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
6 | <meta name="layout" content="main" /> |
---|
7 | <title>Edit Task #${taskInstance?.id}</title> |
---|
8 | <nav:resources override="true"/> |
---|
9 | <resource:dateChooser /> |
---|
10 | </head> |
---|
11 | <body> |
---|
12 | <div class="nav"> |
---|
13 | <nav:renderSubItems group="nav"/> |
---|
14 | </div> |
---|
15 | <div class="body"> |
---|
16 | <g:if test="${flash.message}"> |
---|
17 | <div class="message">${flash.message}</div> |
---|
18 | </g:if> |
---|
19 | <g:hasErrors bean="${taskInstance}"> |
---|
20 | <div class="errors"> |
---|
21 | <g:renderErrors bean="${taskInstance}" as="list" /> |
---|
22 | </div> |
---|
23 | </g:hasErrors> |
---|
24 | <g:form method="post" > |
---|
25 | <input type="hidden" name="id" value="${taskInstance?.id}" /> |
---|
26 | <input type="hidden" name="version" value="${taskInstance?.version}" /> |
---|
27 | <div class="dialog"> |
---|
28 | <table> |
---|
29 | <tbody> |
---|
30 | |
---|
31 | <tr class="prop"> |
---|
32 | <td valign="top" class="name"> |
---|
33 | <label for="id">Id:</label> |
---|
34 | </td> |
---|
35 | <td valign="top" class="value">${fieldValue(bean:taskInstance, field:'id')}</td> |
---|
36 | </tr> |
---|
37 | |
---|
38 | <g:if test="${taskInstance?.parentTask}"> |
---|
39 | <tr class="prop"> |
---|
40 | <td valign="top" class="name">Parent Task:</td> |
---|
41 | |
---|
42 | <td valign="top" class="value"><g:link controller="taskDetailed" action="show" id="${taskInstance.parentTask.id}">${taskInstance.parentTask.encodeAsHTML()}</g:link></td> |
---|
43 | |
---|
44 | </tr> |
---|
45 | </g:if> |
---|
46 | |
---|
47 | <tr class="prop"> |
---|
48 | <td valign="top" class="name"> |
---|
49 | <label for="description">Description:</label> |
---|
50 | </td> |
---|
51 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'description','errors')}"> |
---|
52 | <input type="text" style="width:450px" maxlength="75" id="description" name="description" value="${fieldValue(bean:taskInstance,field:'description')}"/> |
---|
53 | </td> |
---|
54 | </tr> |
---|
55 | |
---|
56 | <tr class="prop"> |
---|
57 | <td valign="top" class="name"> |
---|
58 | <label for="comment">Comment:</label> |
---|
59 | </td> |
---|
60 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'comment','errors')}"> |
---|
61 | <textarea style="width:450px" rows="5" cols="40" name="comment">${fieldValue(bean:taskInstance, field:'comment')}</textarea> |
---|
62 | </td> |
---|
63 | </tr> |
---|
64 | |
---|
65 | <tr class="prop"> |
---|
66 | <td valign="top" class="name"> |
---|
67 | <label for="targetStartDate">Target Start Date:</label> |
---|
68 | </td> |
---|
69 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetStartDate','errors')}"> |
---|
70 | <richui:dateChooser name="targetStartDate" format="dd-MM-yyyy" value="${taskInstance?.targetStartDate}" /> |
---|
71 | </td> |
---|
72 | </tr> |
---|
73 | |
---|
74 | <tr class="prop"> |
---|
75 | <td valign="top" class="name"> |
---|
76 | <label for="targetCompletionDate">Target Completion Date:</label> |
---|
77 | </td> |
---|
78 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetCompletionDate','errors')}"> |
---|
79 | <richui:dateChooser name="targetCompletionDate" format="dd-MM-yyyy" value="${taskInstance?.targetCompletionDate}" /> |
---|
80 | </td> |
---|
81 | </tr> |
---|
82 | |
---|
83 | <tr class="prop"> |
---|
84 | <td valign="top" class="name"> |
---|
85 | <label for="leadPerson">Lead Person:</label> |
---|
86 | </td> |
---|
87 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'leadPerson','errors')}"> |
---|
88 | <g:select optionKey="id" |
---|
89 | from="${Person.findAllByIsActive(true).sort { p1, p2 -> p1.firstName.compareToIgnoreCase(p2.firstName) }}" |
---|
90 | name="leadPerson.id" |
---|
91 | value="${taskInstance?.leadPerson?.id}" > |
---|
92 | </g:select> |
---|
93 | </td> |
---|
94 | </tr> |
---|
95 | |
---|
96 | <tr class="prop"> |
---|
97 | <td valign="top" class="name"> |
---|
98 | <label for="primaryAsset">Primary Asset:</label> |
---|
99 | </td> |
---|
100 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}"> |
---|
101 | <g:select optionKey="id" |
---|
102 | from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
103 | name="primaryAsset.id" |
---|
104 | value="${taskInstance?.primaryAsset?.id}" |
---|
105 | noSelection="['null':/${g.message(code:'default.none.select.text')}/]"> |
---|
106 | </g:select> |
---|
107 | <g:helpBalloon code="task.primaryAsset" /> |
---|
108 | </td> |
---|
109 | </tr> |
---|
110 | |
---|
111 | <tr class="prop"> |
---|
112 | <td valign="top" class="name"> |
---|
113 | <label for="associatedAssets">Associated Assets:</label> |
---|
114 | </td> |
---|
115 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'associatedAssets','errors')}"> |
---|
116 | <g:select id="associatedAssets" |
---|
117 | name="associatedAssets" |
---|
118 | from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
119 | optionKey="id" size="5" multiple="yes" |
---|
120 | value="${taskInstance?.associatedAssets.id}" |
---|
121 | noSelection="['':/${g.message(code:'default.none.select.text')}/]"> |
---|
122 | </g:select> |
---|
123 | <g:helpBalloon class="helpballoon" code="task.associatedAssets" /> |
---|
124 | </td> |
---|
125 | </tr> |
---|
126 | |
---|
127 | <tr class="prop"> |
---|
128 | <td valign="top" class="name"> |
---|
129 | <label for="taskPriority">Task Priority:</label> |
---|
130 | </td> |
---|
131 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskPriority','errors')}"> |
---|
132 | <g:select optionKey="id" |
---|
133 | from="${TaskPriority.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
134 | name="taskPriority.id" |
---|
135 | value="${taskInstance?.taskPriority?.id}" > |
---|
136 | </g:select> |
---|
137 | </td> |
---|
138 | </tr> |
---|
139 | |
---|
140 | <tr class="prop"> |
---|
141 | <td valign="top" class="name"> |
---|
142 | <label for="taskGroup">Task Group:</label> |
---|
143 | </td> |
---|
144 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskGroup','errors')}"> |
---|
145 | <g:select optionKey="id" |
---|
146 | from="${TaskGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
147 | name="taskGroup.id" |
---|
148 | value="${taskInstance?.taskGroup?.id}" > |
---|
149 | </g:select> |
---|
150 | </td> |
---|
151 | </tr> |
---|
152 | |
---|
153 | <tr class="prop"> |
---|
154 | <td valign="top" class="name"> |
---|
155 | <label for="taskType">Task Type:</label> |
---|
156 | </td> |
---|
157 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskType','errors')}"> |
---|
158 | <g:select optionKey="id" |
---|
159 | from="${TaskType.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
160 | name="taskType.id" |
---|
161 | value="${taskInstance?.taskType?.id}" > |
---|
162 | </g:select> |
---|
163 | </td> |
---|
164 | </tr> |
---|
165 | |
---|
166 | <tr class="prop"> |
---|
167 | <td valign="top" class="name"> |
---|
168 | <label for="safetyRequirement">Safety Requirement:</label> |
---|
169 | </td> |
---|
170 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'safetyRequirement','errors')}"> |
---|
171 | <g:checkBox name="safetyRequirement" value="${taskInstance?.safetyRequirement}" ></g:checkBox> |
---|
172 | <g:helpBalloon code="task.safetyRequirement" /> |
---|
173 | </td> |
---|
174 | </tr> |
---|
175 | |
---|
176 | <tr class="prop"> |
---|
177 | <td valign="top" class="name"> |
---|
178 | <label for="regulatoryRequirement">Regulatory Requirement:</label> |
---|
179 | </td> |
---|
180 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'regulatoryRequirement','errors')}"> |
---|
181 | <g:checkBox name="regulatoryRequirement" value="${taskInstance?.regulatoryRequirement}" ></g:checkBox> |
---|
182 | <g:helpBalloon code="task.regulatoryRequirement" /> |
---|
183 | </td> |
---|
184 | </tr> |
---|
185 | |
---|
186 | <tr class="prop"> |
---|
187 | <td valign="top" class="name"> |
---|
188 | <label for="mandatoryRequirement">Mandatory Requirement:</label> |
---|
189 | </td> |
---|
190 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'mandatoryRequirement','errors')}"> |
---|
191 | <g:checkBox name="mandatoryRequirement" value="${taskInstance?.mandatoryRequirement}" ></g:checkBox> |
---|
192 | <g:helpBalloon code="task.mandatoryRequirement" /> |
---|
193 | </td> |
---|
194 | </tr> |
---|
195 | |
---|
196 | <tr class="prop"> |
---|
197 | <td valign="top" class="name"> |
---|
198 | <label for="positiveFault">Positive Fault:</label> |
---|
199 | </td> |
---|
200 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'positiveFault','errors')}"> |
---|
201 | <g:checkBox name="positiveFault" value="${taskInstance?.positiveFault}" ></g:checkBox> |
---|
202 | <g:helpBalloon code="task.positiveFault" /> |
---|
203 | </td> |
---|
204 | </tr> |
---|
205 | |
---|
206 | <g:if test="${taskInstance.assignedGroups}"> |
---|
207 | <tr class="prop"> |
---|
208 | <td valign="top" class="name"> |
---|
209 | <label for="assignedPersons">Assigned Groups:</label> |
---|
210 | </td> |
---|
211 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'assignedGroups','errors')}"> |
---|
212 | |
---|
213 | <ul> |
---|
214 | <g:each var="a" in="${taskInstance?.assignedGroups?}"> |
---|
215 | <li><g:link controller="assignedGroupDetailed" action="edit" id="${a.id}" params="['task.id':taskInstance?.id]">${a?.encodeAsHTML()}</g:link></li> |
---|
216 | </g:each> |
---|
217 | </ul> |
---|
218 | |
---|
219 | </td> |
---|
220 | </tr> |
---|
221 | </g:if> |
---|
222 | |
---|
223 | <g:if test="${taskInstance.assignedPersons}"> |
---|
224 | <tr class="prop"> |
---|
225 | <td valign="top" class="name"> |
---|
226 | <label for="assignedPersons">Assigned Persons:</label> |
---|
227 | </td> |
---|
228 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'assignedPersons','errors')}"> |
---|
229 | |
---|
230 | <ul> |
---|
231 | <g:each var="a" in="${taskInstance?.assignedPersons?}"> |
---|
232 | <li><g:link controller="assignedPersonDetailed" action="edit" id="${a.id}" params="['task.id':taskInstance?.id]">${a?.encodeAsHTML()}</g:link></li> |
---|
233 | </g:each> |
---|
234 | </ul> |
---|
235 | |
---|
236 | </td> |
---|
237 | </tr> |
---|
238 | </g:if> |
---|
239 | |
---|
240 | </tbody> |
---|
241 | </table> |
---|
242 | </div> |
---|
243 | <div class="buttons"> |
---|
244 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
245 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
246 | <span class="button"><g:actionSubmit class="trash" onclick="return confirm('Are you sure?');" value="Trash" /></span> |
---|
247 | </div> |
---|
248 | </g:form> |
---|
249 | </div> |
---|
250 | </body> |
---|
251 | </html> |
---|