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 | <div class="dialog"> |
---|
28 | <table> |
---|
29 | <tbody> |
---|
30 | |
---|
31 | <tr class="prop"> |
---|
32 | <td valign="top" class="name"> |
---|
33 | <label for="targetStartDate">Target Start Date:</label> |
---|
34 | </td> |
---|
35 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetStartDate','errors')}"> |
---|
36 | <g:datePicker name="targetStartDate" value="${taskInstance?.targetStartDate}" ></g:datePicker> |
---|
37 | </td> |
---|
38 | </tr> |
---|
39 | |
---|
40 | <tr class="prop"> |
---|
41 | <td valign="top" class="name"> |
---|
42 | <label for="description">Description:</label> |
---|
43 | </td> |
---|
44 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'description','errors')}"> |
---|
45 | <input type="text" maxlength="50" id="description" name="description" value="${fieldValue(bean:taskInstance,field:'description')}"/> |
---|
46 | </td> |
---|
47 | </tr> |
---|
48 | |
---|
49 | <tr class="prop"> |
---|
50 | <td valign="top" class="name"> |
---|
51 | <label for="leadPerson">Lead Person:</label> |
---|
52 | </td> |
---|
53 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'leadPerson','errors')}"> |
---|
54 | <g:select optionKey="id" from="${Person.list()}" name="leadPerson.id" value="${taskInstance?.leadPerson?.id}" ></g:select> |
---|
55 | </td> |
---|
56 | </tr> |
---|
57 | |
---|
58 | <tr class="prop"> |
---|
59 | <td valign="top" class="name"> |
---|
60 | <label for="taskPriority">Task Priority:</label> |
---|
61 | </td> |
---|
62 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskPriority','errors')}"> |
---|
63 | <g:select optionKey="id" from="${TaskPriority.list()}" name="taskPriority.id" value="${taskInstance?.taskPriority?.id}" ></g:select> |
---|
64 | </td> |
---|
65 | </tr> |
---|
66 | |
---|
67 | <tr class="prop"> |
---|
68 | <td valign="top" class="name"> |
---|
69 | <label for="taskStatus">Task Status:</label> |
---|
70 | </td> |
---|
71 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskStatus','errors')}"> |
---|
72 | <g:select optionKey="id" from="${TaskStatus.list()}" name="taskStatus.id" value="${taskInstance?.taskStatus?.id}" ></g:select> |
---|
73 | </td> |
---|
74 | </tr> |
---|
75 | |
---|
76 | <tr class="prop"> |
---|
77 | <td valign="top" class="name"> |
---|
78 | <label for="parentTask">Parent Task:</label> |
---|
79 | </td> |
---|
80 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'parentTask','errors')}"> |
---|
81 | <g:select optionKey="id" from="${Task.list()}" name="parentTask.id" value="${taskInstance?.parentTask?.id}" noSelection="['null':'']"></g:select> |
---|
82 | </td> |
---|
83 | </tr> |
---|
84 | |
---|
85 | <tr class="prop"> |
---|
86 | <td valign="top" class="name"> |
---|
87 | <label for="comment">Comment:</label> |
---|
88 | </td> |
---|
89 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'comment','errors')}"> |
---|
90 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:taskInstance, field:'comment')}</textarea> |
---|
91 | </td> |
---|
92 | </tr> |
---|
93 | |
---|
94 | <tr class="prop"> |
---|
95 | <td valign="top" class="name"> |
---|
96 | <label for="assignedPersons">Assigned Persons:</label> |
---|
97 | </td> |
---|
98 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'assignedPersons','errors')}"> |
---|
99 | |
---|
100 | <ul> |
---|
101 | <g:each var="a" in="${taskInstance?.assignedPersons?}"> |
---|
102 | <li><g:link controller="person" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
103 | </g:each> |
---|
104 | </ul> |
---|
105 | <g:link controller="person" params="['task.id':taskInstance?.id]" action="create">Add Person</g:link> |
---|
106 | |
---|
107 | </td> |
---|
108 | </tr> |
---|
109 | |
---|
110 | <tr class="prop"> |
---|
111 | <td valign="top" class="name"> |
---|
112 | <label for="entries">Entries:</label> |
---|
113 | </td> |
---|
114 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'entries','errors')}"> |
---|
115 | |
---|
116 | <ul> |
---|
117 | <g:each var="e" in="${taskInstance?.entries?}"> |
---|
118 | <li><g:link controller="entry" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li> |
---|
119 | </g:each> |
---|
120 | </ul> |
---|
121 | <g:link controller="entry" params="['task.id':taskInstance?.id]" action="create">Add Entry</g:link> |
---|
122 | |
---|
123 | </td> |
---|
124 | </tr> |
---|
125 | |
---|
126 | <tr class="prop"> |
---|
127 | <td valign="top" class="name"> |
---|
128 | <label for="isActive">Is Active:</label> |
---|
129 | </td> |
---|
130 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isActive','errors')}"> |
---|
131 | <g:checkBox name="isActive" value="${taskInstance?.isActive}" ></g:checkBox> |
---|
132 | </td> |
---|
133 | </tr> |
---|
134 | |
---|
135 | <tr class="prop"> |
---|
136 | <td valign="top" class="name"> |
---|
137 | <label for="isApproved">Is Approved:</label> |
---|
138 | </td> |
---|
139 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isApproved','errors')}"> |
---|
140 | <g:checkBox name="isApproved" value="${taskInstance?.isApproved}" ></g:checkBox> |
---|
141 | </td> |
---|
142 | </tr> |
---|
143 | |
---|
144 | <tr class="prop"> |
---|
145 | <td valign="top" class="name"> |
---|
146 | <label for="isScheduled">Is Scheduled:</label> |
---|
147 | </td> |
---|
148 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isScheduled','errors')}"> |
---|
149 | <g:checkBox name="isScheduled" value="${taskInstance?.isScheduled}" ></g:checkBox> |
---|
150 | </td> |
---|
151 | </tr> |
---|
152 | |
---|
153 | <tr class="prop"> |
---|
154 | <td valign="top" class="name"> |
---|
155 | <label for="taskModifications">Modifications:</label> |
---|
156 | </td> |
---|
157 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskModifications','errors')}"> |
---|
158 | |
---|
159 | <ul> |
---|
160 | <g:each var="m" in="${taskInstance?.taskModifications?}"> |
---|
161 | <li><g:link controller="taskModification" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
162 | </g:each> |
---|
163 | </ul> |
---|
164 | <g:link controller="taskModification" params="['task.id':taskInstance?.id]" action="create">Add Modification</g:link> |
---|
165 | |
---|
166 | </td> |
---|
167 | </tr> |
---|
168 | |
---|
169 | <tr class="prop"> |
---|
170 | <td valign="top" class="name"> |
---|
171 | <label for="subTasks">Sub Tasks:</label> |
---|
172 | </td> |
---|
173 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'subTasks','errors')}"> |
---|
174 | |
---|
175 | <ul> |
---|
176 | <g:each var="s" in="${taskInstance?.subTasks?}"> |
---|
177 | <li><g:link controller="task" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
178 | </g:each> |
---|
179 | </ul> |
---|
180 | <g:link controller="task" params="['task.id':taskInstance?.id]" action="create">Add Task</g:link> |
---|
181 | |
---|
182 | </td> |
---|
183 | </tr> |
---|
184 | |
---|
185 | <tr class="prop"> |
---|
186 | <td valign="top" class="name"> |
---|
187 | <label for="targetCompletionDate">Target Completion Date:</label> |
---|
188 | </td> |
---|
189 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetCompletionDate','errors')}"> |
---|
190 | <g:datePicker name="targetCompletionDate" value="${taskInstance?.targetCompletionDate}" ></g:datePicker> |
---|
191 | </td> |
---|
192 | </tr> |
---|
193 | |
---|
194 | <tr class="prop"> |
---|
195 | <td valign="top" class="name"> |
---|
196 | <label for="taskGroup">Task Group:</label> |
---|
197 | </td> |
---|
198 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskGroup','errors')}"> |
---|
199 | <g:select optionKey="id" from="${TaskGroup.list()}" name="taskGroup.id" value="${taskInstance?.taskGroup?.id}" ></g:select> |
---|
200 | </td> |
---|
201 | </tr> |
---|
202 | |
---|
203 | <tr class="prop"> |
---|
204 | <td valign="top" class="name"> |
---|
205 | <label for="taskType">Task Type:</label> |
---|
206 | </td> |
---|
207 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskType','errors')}"> |
---|
208 | <g:select optionKey="id" from="${TaskType.list()}" name="taskType.id" value="${taskInstance?.taskType?.id}" ></g:select> |
---|
209 | </td> |
---|
210 | </tr> |
---|
211 | |
---|
212 | </tbody> |
---|
213 | </table> |
---|
214 | </div> |
---|
215 | <div class="buttons"> |
---|
216 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
217 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
218 | </div> |
---|
219 | </g:form> |
---|
220 | </div> |
---|
221 | </body> |
---|
222 | </html> |
---|