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</title> |
---|
8 | </head> |
---|
9 | <body> |
---|
10 | <div class="nav"> |
---|
11 | <span class="menuButton"><g:link class="list" action="list">Task List</g:link></span> |
---|
12 | <span class="menuButton"><g:link class="create" action="create">New Task</g:link></span> |
---|
13 | </div> |
---|
14 | <div class="body"> |
---|
15 | <h1>Edit Task</h1> |
---|
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="description">Description:</label> |
---|
34 | </td> |
---|
35 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'description','errors')}"> |
---|
36 | <input type="text" maxlength="75" id="description" name="description" value="${fieldValue(bean:taskInstance,field:'description')}"/> |
---|
37 | </td> |
---|
38 | </tr> |
---|
39 | |
---|
40 | <tr class="prop"> |
---|
41 | <td valign="top" class="name"> |
---|
42 | <label for="comment">Comment:</label> |
---|
43 | </td> |
---|
44 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'comment','errors')}"> |
---|
45 | <input type="text" id="comment" name="comment" value="${fieldValue(bean:taskInstance,field:'comment')}"/> |
---|
46 | </td> |
---|
47 | </tr> |
---|
48 | |
---|
49 | <tr class="prop"> |
---|
50 | <td valign="top" class="name"> |
---|
51 | <label for="targetStartDate">Target Start Date:</label> |
---|
52 | </td> |
---|
53 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetStartDate','errors')}"> |
---|
54 | <g:datePicker name="targetStartDate" value="${taskInstance?.targetStartDate}" precision="minute" ></g:datePicker> |
---|
55 | </td> |
---|
56 | </tr> |
---|
57 | |
---|
58 | <tr class="prop"> |
---|
59 | <td valign="top" class="name"> |
---|
60 | <label for="targetCompletionDate">Target Completion Date:</label> |
---|
61 | </td> |
---|
62 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetCompletionDate','errors')}"> |
---|
63 | <g:datePicker name="targetCompletionDate" value="${taskInstance?.targetCompletionDate}" precision="minute" ></g:datePicker> |
---|
64 | </td> |
---|
65 | </tr> |
---|
66 | |
---|
67 | <tr class="prop"> |
---|
68 | <td valign="top" class="name"> |
---|
69 | <label for="leadPerson">Lead Person:</label> |
---|
70 | </td> |
---|
71 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'leadPerson','errors')}"> |
---|
72 | <g:select optionKey="id" from="${Person.list()}" name="leadPerson.id" value="${taskInstance?.leadPerson?.id}" ></g:select> |
---|
73 | </td> |
---|
74 | </tr> |
---|
75 | |
---|
76 | <tr class="prop"> |
---|
77 | <td valign="top" class="name"> |
---|
78 | <label for="taskPriority">Task Priority:</label> |
---|
79 | </td> |
---|
80 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskPriority','errors')}"> |
---|
81 | <g:select optionKey="id" from="${TaskPriority.list()}" name="taskPriority.id" value="${taskInstance?.taskPriority?.id}" ></g:select> |
---|
82 | </td> |
---|
83 | </tr> |
---|
84 | |
---|
85 | <tr class="prop"> |
---|
86 | <td valign="top" class="name"> |
---|
87 | <label for="taskStatus">Task Status:</label> |
---|
88 | </td> |
---|
89 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskStatus','errors')}"> |
---|
90 | <g:select optionKey="id" from="${TaskStatus.list()}" name="taskStatus.id" value="${taskInstance?.taskStatus?.id}" ></g:select> |
---|
91 | </td> |
---|
92 | </tr> |
---|
93 | |
---|
94 | <tr class="prop"> |
---|
95 | <td valign="top" class="name"> |
---|
96 | <label for="parentTask">Parent Task:</label> |
---|
97 | </td> |
---|
98 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'parentTask','errors')}"> |
---|
99 | <g:select optionKey="id" from="${Task.list()}" name="parentTask.id" value="${taskInstance?.parentTask?.id}" noSelection="['null':'']"></g:select> |
---|
100 | </td> |
---|
101 | </tr> |
---|
102 | |
---|
103 | <tr class="prop"> |
---|
104 | <td valign="top" class="name"> |
---|
105 | <label for="primaryAsset">Primary Asset:</label> |
---|
106 | </td> |
---|
107 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}"> |
---|
108 | <g:select optionKey="id" from="${Asset.list()}" name="primaryAsset.id" value="${taskInstance?.primaryAsset?.id}" noSelection="['null':'']"></g:select> |
---|
109 | </td> |
---|
110 | </tr> |
---|
111 | |
---|
112 | <tr class="prop"> |
---|
113 | <td valign="top" class="name"> |
---|
114 | <label for="taskRecurringSchedule">Task Recurring Schedule:</label> |
---|
115 | </td> |
---|
116 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskRecurringSchedule','errors')}"> |
---|
117 | <g:select optionKey="id" from="${TaskRecurringSchedule.list()}" name="taskRecurringSchedule.id" value="${taskInstance?.taskRecurringSchedule?.id}" noSelection="['null':'']"></g:select> |
---|
118 | </td> |
---|
119 | </tr> |
---|
120 | |
---|
121 | <tr class="prop"> |
---|
122 | <td valign="top" class="name"> |
---|
123 | <label for="taskProcedure">Task Procedure:</label> |
---|
124 | </td> |
---|
125 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskProcedure','errors')}"> |
---|
126 | <g:select optionKey="id" from="${TaskProcedure.list()}" name="taskProcedure.id" value="${taskInstance?.taskProcedure?.id}" noSelection="['null':'']"></g:select> |
---|
127 | </td> |
---|
128 | </tr> |
---|
129 | |
---|
130 | <tr class="prop"> |
---|
131 | <td valign="top" class="name"> |
---|
132 | <label for="approved">Approved:</label> |
---|
133 | </td> |
---|
134 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'approved','errors')}"> |
---|
135 | <g:checkBox name="approved" value="${taskInstance?.approved}" ></g:checkBox> |
---|
136 | </td> |
---|
137 | </tr> |
---|
138 | |
---|
139 | <tr class="prop"> |
---|
140 | <td valign="top" class="name"> |
---|
141 | <label for="assignedPersons">Assigned Persons:</label> |
---|
142 | </td> |
---|
143 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'assignedPersons','errors')}"> |
---|
144 | |
---|
145 | <ul> |
---|
146 | <g:each var="a" in="${taskInstance?.assignedPersons?}"> |
---|
147 | <li><g:link controller="assignedPerson" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
148 | </g:each> |
---|
149 | </ul> |
---|
150 | <g:link controller="assignedPerson" params="['task.id':taskInstance?.id]" action="create">Add AssignedPerson</g:link> |
---|
151 | |
---|
152 | </td> |
---|
153 | </tr> |
---|
154 | |
---|
155 | <tr class="prop"> |
---|
156 | <td valign="top" class="name"> |
---|
157 | <label for="associatedAssets">Associated Assets:</label> |
---|
158 | </td> |
---|
159 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'associatedAssets','errors')}"> |
---|
160 | <g:select name="associatedAssets" |
---|
161 | from="${Asset.list()}" |
---|
162 | size="5" multiple="yes" optionKey="id" |
---|
163 | value="${taskInstance?.associatedAssets}" /> |
---|
164 | |
---|
165 | </td> |
---|
166 | </tr> |
---|
167 | |
---|
168 | <tr class="prop"> |
---|
169 | <td valign="top" class="name"> |
---|
170 | <label for="entries">Entries:</label> |
---|
171 | </td> |
---|
172 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'entries','errors')}"> |
---|
173 | |
---|
174 | <ul> |
---|
175 | <g:each var="e" in="${taskInstance?.entries?}"> |
---|
176 | <li><g:link controller="entry" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li> |
---|
177 | </g:each> |
---|
178 | </ul> |
---|
179 | <g:link controller="entry" params="['task.id':taskInstance?.id]" action="create">Add Entry</g:link> |
---|
180 | |
---|
181 | </td> |
---|
182 | </tr> |
---|
183 | |
---|
184 | <tr class="prop"> |
---|
185 | <td valign="top" class="name"> |
---|
186 | <label for="inventoryMovements">Inventory Movements:</label> |
---|
187 | </td> |
---|
188 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'inventoryMovements','errors')}"> |
---|
189 | |
---|
190 | <ul> |
---|
191 | <g:each var="i" in="${taskInstance?.inventoryMovements?}"> |
---|
192 | <li><g:link controller="inventoryMovement" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></li> |
---|
193 | </g:each> |
---|
194 | </ul> |
---|
195 | <g:link controller="inventoryMovement" params="['task.id':taskInstance?.id]" action="create">Add InventoryMovement</g:link> |
---|
196 | |
---|
197 | </td> |
---|
198 | </tr> |
---|
199 | |
---|
200 | <tr class="prop"> |
---|
201 | <td valign="top" class="name"> |
---|
202 | <label for="scheduled">Scheduled:</label> |
---|
203 | </td> |
---|
204 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'scheduled','errors')}"> |
---|
205 | <g:checkBox name="scheduled" value="${taskInstance?.scheduled}" ></g:checkBox> |
---|
206 | </td> |
---|
207 | </tr> |
---|
208 | |
---|
209 | <tr class="prop"> |
---|
210 | <td valign="top" class="name"> |
---|
211 | <label for="subTasks">Sub Tasks:</label> |
---|
212 | </td> |
---|
213 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'subTasks','errors')}"> |
---|
214 | |
---|
215 | <ul> |
---|
216 | <g:each var="s" in="${taskInstance?.subTasks?}"> |
---|
217 | <li><g:link controller="task" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
218 | </g:each> |
---|
219 | </ul> |
---|
220 | <g:link controller="task" params="['task.id':taskInstance?.id]" action="create">Add Task</g:link> |
---|
221 | |
---|
222 | </td> |
---|
223 | </tr> |
---|
224 | |
---|
225 | <tr class="prop"> |
---|
226 | <td valign="top" class="name"> |
---|
227 | <label for="taskGroup">Task Group:</label> |
---|
228 | </td> |
---|
229 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskGroup','errors')}"> |
---|
230 | <g:select optionKey="id" from="${TaskGroup.list()}" name="taskGroup.id" value="${taskInstance?.taskGroup?.id}" ></g:select> |
---|
231 | </td> |
---|
232 | </tr> |
---|
233 | |
---|
234 | <tr class="prop"> |
---|
235 | <td valign="top" class="name"> |
---|
236 | <label for="taskModifications">Task Modifications:</label> |
---|
237 | </td> |
---|
238 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskModifications','errors')}"> |
---|
239 | |
---|
240 | <ul> |
---|
241 | <g:each var="t" in="${taskInstance?.taskModifications?}"> |
---|
242 | <li><g:link controller="taskModification" action="show" id="${t.id}">${t?.encodeAsHTML()}</g:link></li> |
---|
243 | </g:each> |
---|
244 | </ul> |
---|
245 | <g:link controller="taskModification" params="['task.id':taskInstance?.id]" action="create">Add TaskModification</g:link> |
---|
246 | |
---|
247 | </td> |
---|
248 | </tr> |
---|
249 | |
---|
250 | <tr class="prop"> |
---|
251 | <td valign="top" class="name"> |
---|
252 | <label for="taskType">Task Type:</label> |
---|
253 | </td> |
---|
254 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskType','errors')}"> |
---|
255 | <g:select optionKey="id" from="${TaskType.list()}" name="taskType.id" value="${taskInstance?.taskType?.id}" ></g:select> |
---|
256 | </td> |
---|
257 | </tr> |
---|
258 | |
---|
259 | <tr class="prop"> |
---|
260 | <td valign="top" class="name"> |
---|
261 | <label for="trash">Trash:</label> |
---|
262 | </td> |
---|
263 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'trash','errors')}"> |
---|
264 | <g:checkBox name="trash" value="${taskInstance?.trash}" ></g:checkBox> |
---|
265 | </td> |
---|
266 | </tr> |
---|
267 | |
---|
268 | </tbody> |
---|
269 | </table> |
---|
270 | </div> |
---|
271 | <div class="buttons"> |
---|
272 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
273 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
274 | </div> |
---|
275 | </g:form> |
---|
276 | </div> |
---|
277 | </body> |
---|
278 | </html> |
---|