| 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="taskBudgetStatus">Budget Status:</label> | 
|---|
| 143 |                                 </td> | 
|---|
| 144 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskBudgetStatus','errors')}"> | 
|---|
| 145 |                                     <g:select optionKey="id" | 
|---|
| 146 |                                                         from="${TaskBudgetStatus.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" | 
|---|
| 147 |                                                         name="taskBudgetStatus.id" | 
|---|
| 148 |                                                         value="${taskInstance?.taskBudgetStatus?.id}" > | 
|---|
| 149 |                                     </g:select> | 
|---|
| 150 |                                 </td> | 
|---|
| 151 |                             </tr> | 
|---|
| 152 |                          | 
|---|
| 153 |                             <tr class="prop"> | 
|---|
| 154 |                                 <td valign="top" class="name"> | 
|---|
| 155 |                                     <label for="taskGroup">Task Group:</label> | 
|---|
| 156 |                                 </td> | 
|---|
| 157 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskGroup','errors')}"> | 
|---|
| 158 |                                     <g:select optionKey="id" | 
|---|
| 159 |                                                         from="${TaskGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" | 
|---|
| 160 |                                                         name="taskGroup.id" | 
|---|
| 161 |                                                         value="${taskInstance?.taskGroup?.id}" > | 
|---|
| 162 |                                     </g:select> | 
|---|
| 163 |                                 </td> | 
|---|
| 164 |                             </tr> | 
|---|
| 165 |                          | 
|---|
| 166 |                             <tr class="prop"> | 
|---|
| 167 |                                 <td valign="top" class="name"> | 
|---|
| 168 |                                     <label for="taskType">Task Type:</label> | 
|---|
| 169 |                                 </td> | 
|---|
| 170 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskType','errors')}"> | 
|---|
| 171 |                                     <g:select optionKey="id" | 
|---|
| 172 |                                                         from="${TaskType.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" | 
|---|
| 173 |                                                         name="taskType.id" | 
|---|
| 174 |                                                         value="${taskInstance?.taskType?.id}" > | 
|---|
| 175 |                                     </g:select> | 
|---|
| 176 |                                 </td> | 
|---|
| 177 |                             </tr> | 
|---|
| 178 |                          | 
|---|
| 179 |                             <tr class="prop"> | 
|---|
| 180 |                                 <td valign="top" class="name"> | 
|---|
| 181 |                                     <label for="isActive">Safety Requirement:</label> | 
|---|
| 182 |                                 </td> | 
|---|
| 183 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'safetyRequirement','errors')}"> | 
|---|
| 184 |                                     <g:checkBox name="safetyRequirement" value="${taskInstance?.safetyRequirement}" ></g:checkBox> | 
|---|
| 185 |                                     <g:helpBalloon code="task.safetyRequirement" /> | 
|---|
| 186 |                                 </td> | 
|---|
| 187 |                             </tr>  | 
|---|
| 188 |                          | 
|---|
| 189 |                             <tr class="prop"> | 
|---|
| 190 |                                 <td valign="top" class="name"> | 
|---|
| 191 |                                     <label for="isActive">Mandatory/Regulatory:</label> | 
|---|
| 192 |                                 </td> | 
|---|
| 193 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'mandatoryRegulatory','errors')}"> | 
|---|
| 194 |                                     <g:checkBox name="mandatoryRegulatory" value="${taskInstance?.mandatoryRegulatory}" ></g:checkBox> | 
|---|
| 195 |                                     <g:helpBalloon code="task.mandatoryRegulatory" /> | 
|---|
| 196 |                                 </td> | 
|---|
| 197 |                             </tr>  | 
|---|
| 198 |                          | 
|---|
| 199 |                             <tr class="prop"> | 
|---|
| 200 |                                 <td valign="top" class="name"> | 
|---|
| 201 |                                     <label for="isActive">Positive Fault:</label> | 
|---|
| 202 |                                 </td> | 
|---|
| 203 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'positiveFault','errors')}"> | 
|---|
| 204 |                                     <g:checkBox name="positiveFault" value="${taskInstance?.positiveFault}" ></g:checkBox> | 
|---|
| 205 |                                     <g:helpBalloon code="task.positiveFault" /> | 
|---|
| 206 |                                 </td> | 
|---|
| 207 |                             </tr>  | 
|---|
| 208 |  | 
|---|
| 209 |                             <g:if test="${taskInstance.assignedGroups}"> | 
|---|
| 210 |                                 <tr class="prop"> | 
|---|
| 211 |                                     <td valign="top" class="name"> | 
|---|
| 212 |                                         <label for="assignedPersons">Assigned Groups:</label> | 
|---|
| 213 |                                     </td> | 
|---|
| 214 |                                     <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'assignedGroups','errors')}"> | 
|---|
| 215 |                                          | 
|---|
| 216 |                                     <ul> | 
|---|
| 217 |                                     <g:each var="a" in="${taskInstance?.assignedGroups?}"> | 
|---|
| 218 |                                         <li><g:link controller="assignedGroupDetailed" action="edit" id="${a.id}" params="['task.id':taskInstance?.id]">${a?.encodeAsHTML()}</g:link></li> | 
|---|
| 219 |                                     </g:each> | 
|---|
| 220 |                                     </ul> | 
|---|
| 221 |  | 
|---|
| 222 |                                     </td> | 
|---|
| 223 |                                 </tr> | 
|---|
| 224 |                             </g:if> | 
|---|
| 225 |  | 
|---|
| 226 |                             <g:if test="${taskInstance.assignedPersons}"> | 
|---|
| 227 |                                 <tr class="prop"> | 
|---|
| 228 |                                     <td valign="top" class="name"> | 
|---|
| 229 |                                         <label for="assignedPersons">Assigned Persons:</label> | 
|---|
| 230 |                                     </td> | 
|---|
| 231 |                                     <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'assignedPersons','errors')}"> | 
|---|
| 232 |                                          | 
|---|
| 233 |                                     <ul> | 
|---|
| 234 |                                     <g:each var="a" in="${taskInstance?.assignedPersons?}"> | 
|---|
| 235 |                                         <li><g:link controller="assignedPersonDetailed" action="edit" id="${a.id}" params="['task.id':taskInstance?.id]">${a?.encodeAsHTML()}</g:link></li> | 
|---|
| 236 |                                     </g:each> | 
|---|
| 237 |                                     </ul> | 
|---|
| 238 |  | 
|---|
| 239 |                                     </td> | 
|---|
| 240 |                                 </tr> | 
|---|
| 241 |                             </g:if> | 
|---|
| 242 |  | 
|---|
| 243 |                         </tbody> | 
|---|
| 244 |                     </table> | 
|---|
| 245 |                 </div> | 
|---|
| 246 |                 <div class="buttons"> | 
|---|
| 247 |                     <span class="button"><g:actionSubmit class="save" value="Update" /></span> | 
|---|
| 248 |                     <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> | 
|---|
| 249 |                     <span class="button"><g:actionSubmit class="trash" onclick="return confirm('Are you sure?');" value="Trash" /></span> | 
|---|
| 250 |                 </div> | 
|---|
| 251 |             </g:form> | 
|---|
| 252 |         </div> | 
|---|
| 253 |     </body> | 
|---|
| 254 | </html> | 
|---|