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