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 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:taskInstance, field:'comment')}</textarea> |
---|
92 | </td> |
---|
93 | </tr> |
---|
94 | |
---|
95 | <tr class="prop"> |
---|
96 | <td valign="top" class="name"> |
---|
97 | <label for="assignedPersons">Assigned Persons:</label> |
---|
98 | </td> |
---|
99 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'assignedPersons','errors')}"> |
---|
100 | |
---|
101 | <ul> |
---|
102 | <g:each var="a" in="${taskInstance?.assignedPersons?}"> |
---|
103 | <li><g:link controller="assignedPerson" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
104 | </g:each> |
---|
105 | </ul> |
---|
106 | <g:link controller="assignedPerson" params="['task.id':taskInstance?.id]" action="create">Add AssignedPerson</g:link> |
---|
107 | |
---|
108 | </td> |
---|
109 | </tr> |
---|
110 | |
---|
111 | <tr class="prop"> |
---|
112 | <td valign="top" class="name"> |
---|
113 | <label for="entries">Entries:</label> |
---|
114 | </td> |
---|
115 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'entries','errors')}"> |
---|
116 | |
---|
117 | <ul> |
---|
118 | <g:each var="e" in="${taskInstance?.entries?}"> |
---|
119 | <li><g:link controller="entry" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li> |
---|
120 | </g:each> |
---|
121 | </ul> |
---|
122 | <g:link controller="entry" params="['task.id':taskInstance?.id]" action="create">Add Entry</g:link> |
---|
123 | |
---|
124 | </td> |
---|
125 | </tr> |
---|
126 | |
---|
127 | <tr class="prop"> |
---|
128 | <td valign="top" class="name"> |
---|
129 | <label for="isActive">Is Active:</label> |
---|
130 | </td> |
---|
131 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isActive','errors')}"> |
---|
132 | <g:checkBox name="isActive" value="${taskInstance?.isActive}" ></g:checkBox> |
---|
133 | </td> |
---|
134 | </tr> |
---|
135 | |
---|
136 | <tr class="prop"> |
---|
137 | <td valign="top" class="name"> |
---|
138 | <label for="isApproved">Is Approved:</label> |
---|
139 | </td> |
---|
140 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isApproved','errors')}"> |
---|
141 | <g:checkBox name="isApproved" value="${taskInstance?.isApproved}" ></g:checkBox> |
---|
142 | </td> |
---|
143 | </tr> |
---|
144 | |
---|
145 | <tr class="prop"> |
---|
146 | <td valign="top" class="name"> |
---|
147 | <label for="isScheduled">Is Scheduled:</label> |
---|
148 | </td> |
---|
149 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isScheduled','errors')}"> |
---|
150 | <g:checkBox name="isScheduled" value="${taskInstance?.isScheduled}" ></g:checkBox> |
---|
151 | </td> |
---|
152 | </tr> |
---|
153 | |
---|
154 | <tr class="prop"> |
---|
155 | <td valign="top" class="name"> |
---|
156 | <label for="subTasks">Sub Tasks:</label> |
---|
157 | </td> |
---|
158 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'subTasks','errors')}"> |
---|
159 | |
---|
160 | <ul> |
---|
161 | <g:each var="s" in="${taskInstance?.subTasks?}"> |
---|
162 | <li><g:link controller="task" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
163 | </g:each> |
---|
164 | </ul> |
---|
165 | <g:link controller="task" params="['task.id':taskInstance?.id]" action="create">Add Task</g:link> |
---|
166 | |
---|
167 | </td> |
---|
168 | </tr> |
---|
169 | |
---|
170 | <tr class="prop"> |
---|
171 | <td valign="top" class="name"> |
---|
172 | <label for="targetCompletionDate">Target Completion Date:</label> |
---|
173 | </td> |
---|
174 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetCompletionDate','errors')}"> |
---|
175 | <g:datePicker name="targetCompletionDate" value="${taskInstance?.targetCompletionDate}" ></g:datePicker> |
---|
176 | </td> |
---|
177 | </tr> |
---|
178 | |
---|
179 | <tr class="prop"> |
---|
180 | <td valign="top" class="name"> |
---|
181 | <label for="taskGroup">Task Group:</label> |
---|
182 | </td> |
---|
183 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskGroup','errors')}"> |
---|
184 | <g:select optionKey="id" from="${TaskGroup.list()}" name="taskGroup.id" value="${taskInstance?.taskGroup?.id}" ></g:select> |
---|
185 | </td> |
---|
186 | </tr> |
---|
187 | |
---|
188 | <tr class="prop"> |
---|
189 | <td valign="top" class="name"> |
---|
190 | <label for="taskModifications">Task Modifications:</label> |
---|
191 | </td> |
---|
192 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskModifications','errors')}"> |
---|
193 | |
---|
194 | <ul> |
---|
195 | <g:each var="t" in="${taskInstance?.taskModifications?}"> |
---|
196 | <li><g:link controller="taskModification" action="show" id="${t.id}">${t?.encodeAsHTML()}</g:link></li> |
---|
197 | </g:each> |
---|
198 | </ul> |
---|
199 | <g:link controller="taskModification" params="['task.id':taskInstance?.id]" action="create">Add TaskModification</g:link> |
---|
200 | |
---|
201 | </td> |
---|
202 | </tr> |
---|
203 | |
---|
204 | <tr class="prop"> |
---|
205 | <td valign="top" class="name"> |
---|
206 | <label for="taskType">Task Type:</label> |
---|
207 | </td> |
---|
208 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskType','errors')}"> |
---|
209 | <g:select optionKey="id" from="${TaskType.list()}" name="taskType.id" value="${taskInstance?.taskType?.id}" ></g:select> |
---|
210 | </td> |
---|
211 | </tr> |
---|
212 | |
---|
213 | </tbody> |
---|
214 | </table> |
---|
215 | </div> |
---|
216 | <div class="buttons"> |
---|
217 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
218 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
219 | </div> |
---|
220 | </g:form> |
---|
221 | </div> |
---|
222 | </body> |
---|
223 | </html> |
---|