[84] | 1 | |
---|
| 2 | |
---|
| 3 | <html> |
---|
| 4 | <head> |
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
| 6 | <meta name="layout" content="main" /> |
---|
[247] | 7 | <title>Edit Task #${taskInstance?.id}</title> |
---|
[139] | 8 | <nav:resources override="true"/> |
---|
[147] | 9 | <resource:dateChooser /> |
---|
[84] | 10 | </head> |
---|
| 11 | <body> |
---|
| 12 | <div class="nav"> |
---|
[139] | 13 | <nav:renderSubItems group="nav"/> |
---|
[84] | 14 | </div> |
---|
| 15 | <div class="body"> |
---|
[815] | 16 | <g:render template="/shared/messages" /> |
---|
[84] | 17 | <g:hasErrors bean="${taskInstance}"> |
---|
| 18 | <div class="errors"> |
---|
| 19 | <g:renderErrors bean="${taskInstance}" as="list" /> |
---|
| 20 | </div> |
---|
| 21 | </g:hasErrors> |
---|
| 22 | <g:form method="post" > |
---|
| 23 | <input type="hidden" name="id" value="${taskInstance?.id}" /> |
---|
[204] | 24 | <input type="hidden" name="version" value="${taskInstance?.version}" /> |
---|
[84] | 25 | <div class="dialog"> |
---|
| 26 | <table> |
---|
| 27 | <tbody> |
---|
| 28 | |
---|
| 29 | <tr class="prop"> |
---|
| 30 | <td valign="top" class="name"> |
---|
[86] | 31 | <label for="id">Id:</label> |
---|
| 32 | </td> |
---|
| 33 | <td valign="top" class="value">${fieldValue(bean:taskInstance, field:'id')}</td> |
---|
| 34 | </tr> |
---|
| 35 | |
---|
[247] | 36 | <g:if test="${taskInstance?.parentTask}"> |
---|
[246] | 37 | <tr class="prop"> |
---|
| 38 | <td valign="top" class="name">Parent Task:</td> |
---|
| 39 | |
---|
| 40 | <td valign="top" class="value"><g:link controller="taskDetailed" action="show" id="${taskInstance.parentTask.id}">${taskInstance.parentTask.encodeAsHTML()}</g:link></td> |
---|
| 41 | |
---|
| 42 | </tr> |
---|
| 43 | </g:if> |
---|
| 44 | |
---|
[86] | 45 | <tr class="prop"> |
---|
| 46 | <td valign="top" class="name"> |
---|
[84] | 47 | <label for="description">Description:</label> |
---|
| 48 | </td> |
---|
| 49 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'description','errors')}"> |
---|
[91] | 50 | <input type="text" style="width:450px" maxlength="75" id="description" name="description" value="${fieldValue(bean:taskInstance,field:'description')}"/> |
---|
[84] | 51 | </td> |
---|
[86] | 52 | </tr> |
---|
| 53 | |
---|
| 54 | <tr class="prop"> |
---|
| 55 | <td valign="top" class="name"> |
---|
| 56 | <label for="comment">Comment:</label> |
---|
| 57 | </td> |
---|
| 58 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'comment','errors')}"> |
---|
| 59 | <textarea style="width:450px" rows="5" cols="40" name="comment">${fieldValue(bean:taskInstance, field:'comment')}</textarea> |
---|
| 60 | </td> |
---|
| 61 | </tr> |
---|
[84] | 62 | |
---|
| 63 | <tr class="prop"> |
---|
| 64 | <td valign="top" class="name"> |
---|
| 65 | <label for="targetStartDate">Target Start Date:</label> |
---|
| 66 | </td> |
---|
| 67 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetStartDate','errors')}"> |
---|
[147] | 68 | <richui:dateChooser name="targetStartDate" format="dd-MM-yyyy" value="${taskInstance?.targetStartDate}" /> |
---|
[84] | 69 | </td> |
---|
| 70 | </tr> |
---|
[86] | 71 | |
---|
| 72 | <tr class="prop"> |
---|
| 73 | <td valign="top" class="name"> |
---|
| 74 | <label for="targetCompletionDate">Target Completion Date:</label> |
---|
| 75 | </td> |
---|
| 76 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetCompletionDate','errors')}"> |
---|
[147] | 77 | <richui:dateChooser name="targetCompletionDate" format="dd-MM-yyyy" value="${taskInstance?.targetCompletionDate}" /> |
---|
[86] | 78 | </td> |
---|
| 79 | </tr> |
---|
[84] | 80 | |
---|
| 81 | <tr class="prop"> |
---|
| 82 | <td valign="top" class="name"> |
---|
| 83 | <label for="leadPerson">Lead Person:</label> |
---|
| 84 | </td> |
---|
| 85 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'leadPerson','errors')}"> |
---|
[487] | 86 | <g:select optionKey="id" |
---|
| 87 | from="${Person.findAllByIsActive(true).sort { p1, p2 -> p1.firstName.compareToIgnoreCase(p2.firstName) }}" |
---|
| 88 | name="leadPerson.id" |
---|
| 89 | value="${taskInstance?.leadPerson?.id}" > |
---|
| 90 | </g:select> |
---|
[84] | 91 | </td> |
---|
[168] | 92 | </tr> |
---|
[84] | 93 | |
---|
| 94 | <tr class="prop"> |
---|
| 95 | <td valign="top" class="name"> |
---|
[168] | 96 | <label for="primaryAsset">Primary Asset:</label> |
---|
| 97 | </td> |
---|
| 98 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}"> |
---|
[487] | 99 | <g:select optionKey="id" |
---|
| 100 | from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
| 101 | name="primaryAsset.id" |
---|
| 102 | value="${taskInstance?.primaryAsset?.id}" |
---|
[601] | 103 | noSelection="['null':/${g.message(code:'default.none.select.text')}/]"> |
---|
[487] | 104 | </g:select> |
---|
[168] | 105 | <g:helpBalloon code="task.primaryAsset" /> |
---|
| 106 | </td> |
---|
| 107 | </tr> |
---|
| 108 | |
---|
| 109 | <tr class="prop"> |
---|
| 110 | <td valign="top" class="name"> |
---|
| 111 | <label for="associatedAssets">Associated Assets:</label> |
---|
| 112 | </td> |
---|
| 113 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'associatedAssets','errors')}"> |
---|
[487] | 114 | <g:select id="associatedAssets" |
---|
| 115 | name="associatedAssets" |
---|
| 116 | from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
[168] | 117 | optionKey="id" size="5" multiple="yes" |
---|
[487] | 118 | value="${taskInstance?.associatedAssets.id}" |
---|
[602] | 119 | noSelection="['':/${g.message(code:'default.none.select.text')}/]"> |
---|
[487] | 120 | </g:select> |
---|
[168] | 121 | <g:helpBalloon class="helpballoon" code="task.associatedAssets" /> |
---|
| 122 | </td> |
---|
| 123 | </tr> |
---|
| 124 | |
---|
| 125 | <tr class="prop"> |
---|
| 126 | <td valign="top" class="name"> |
---|
[84] | 127 | <label for="taskPriority">Task Priority:</label> |
---|
| 128 | </td> |
---|
| 129 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskPriority','errors')}"> |
---|
[487] | 130 | <g:select optionKey="id" |
---|
| 131 | from="${TaskPriority.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
| 132 | name="taskPriority.id" |
---|
| 133 | value="${taskInstance?.taskPriority?.id}" > |
---|
| 134 | </g:select> |
---|
[84] | 135 | </td> |
---|
[252] | 136 | </tr> |
---|
[84] | 137 | |
---|
| 138 | <tr class="prop"> |
---|
| 139 | <td valign="top" class="name"> |
---|
| 140 | <label for="taskGroup">Task Group:</label> |
---|
| 141 | </td> |
---|
| 142 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskGroup','errors')}"> |
---|
[487] | 143 | <g:select optionKey="id" |
---|
| 144 | from="${TaskGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
| 145 | name="taskGroup.id" |
---|
| 146 | value="${taskInstance?.taskGroup?.id}" > |
---|
| 147 | </g:select> |
---|
[84] | 148 | </td> |
---|
[487] | 149 | </tr> |
---|
[84] | 150 | |
---|
| 151 | <tr class="prop"> |
---|
| 152 | <td valign="top" class="name"> |
---|
| 153 | <label for="taskType">Task Type:</label> |
---|
| 154 | </td> |
---|
| 155 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskType','errors')}"> |
---|
[487] | 156 | <g:select optionKey="id" |
---|
| 157 | from="${TaskType.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
| 158 | name="taskType.id" |
---|
| 159 | value="${taskInstance?.taskType?.id}" > |
---|
| 160 | </g:select> |
---|
[84] | 161 | </td> |
---|
[96] | 162 | </tr> |
---|
| 163 | |
---|
[884] | 164 | <g:ifAnyGranted role="ROLE_AppAdmin,ROLE_Manager,ROLE_TaskManager"> |
---|
| 165 | <tr class="prop"> |
---|
| 166 | <td valign="top" class="name"> |
---|
| 167 | <label for="safetyRequirement">Safety Requirement:</label> |
---|
| 168 | </td> |
---|
| 169 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'safetyRequirement','errors')}"> |
---|
| 170 | <g:checkBox name="safetyRequirement" value="${taskInstance?.safetyRequirement}" ></g:checkBox> |
---|
| 171 | <g:helpBalloon code="task.safetyRequirement" /> |
---|
| 172 | </td> |
---|
| 173 | </tr> |
---|
| 174 | |
---|
| 175 | <tr class="prop"> |
---|
| 176 | <td valign="top" class="name"> |
---|
| 177 | <label for="regulatoryRequirement">Regulatory Requirement:</label> |
---|
| 178 | </td> |
---|
| 179 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'regulatoryRequirement','errors')}"> |
---|
| 180 | <g:checkBox name="regulatoryRequirement" value="${taskInstance?.regulatoryRequirement}" ></g:checkBox> |
---|
| 181 | <g:helpBalloon code="task.regulatoryRequirement" /> |
---|
| 182 | </td> |
---|
| 183 | </tr> |
---|
| 184 | |
---|
| 185 | <tr class="prop"> |
---|
| 186 | <td valign="top" class="name"> |
---|
| 187 | <label for="mandatoryRequirement">Mandatory Requirement:</label> |
---|
| 188 | </td> |
---|
| 189 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'mandatoryRequirement','errors')}"> |
---|
| 190 | <g:checkBox name="mandatoryRequirement" value="${taskInstance?.mandatoryRequirement}" ></g:checkBox> |
---|
| 191 | <g:helpBalloon code="task.mandatoryRequirement" /> |
---|
| 192 | </td> |
---|
| 193 | </tr> |
---|
| 194 | |
---|
| 195 | <tr class="prop"> |
---|
| 196 | <td valign="top" class="name"> |
---|
| 197 | <label for="positiveFault">Positive Fault:</label> |
---|
| 198 | </td> |
---|
| 199 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'positiveFault','errors')}"> |
---|
| 200 | <g:checkBox name="positiveFault" value="${taskInstance?.positiveFault}" ></g:checkBox> |
---|
| 201 | <g:helpBalloon code="task.positiveFault" /> |
---|
| 202 | </td> |
---|
| 203 | </tr> |
---|
| 204 | </g:ifAnyGranted> |
---|
| 205 | |
---|
[591] | 206 | <g:if test="${taskInstance.assignedGroups}"> |
---|
| 207 | <tr class="prop"> |
---|
| 208 | <td valign="top" class="name"> |
---|
| 209 | <label for="assignedPersons">Assigned Groups:</label> |
---|
| 210 | </td> |
---|
| 211 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'assignedGroups','errors')}"> |
---|
| 212 | |
---|
| 213 | <ul> |
---|
| 214 | <g:each var="a" in="${taskInstance?.assignedGroups?}"> |
---|
| 215 | <li><g:link controller="assignedGroupDetailed" action="edit" id="${a.id}" params="['task.id':taskInstance?.id]">${a?.encodeAsHTML()}</g:link></li> |
---|
| 216 | </g:each> |
---|
| 217 | </ul> |
---|
[242] | 218 | |
---|
[591] | 219 | </td> |
---|
| 220 | </tr> |
---|
| 221 | </g:if> |
---|
[242] | 222 | |
---|
[591] | 223 | <g:if test="${taskInstance.assignedPersons}"> |
---|
| 224 | <tr class="prop"> |
---|
| 225 | <td valign="top" class="name"> |
---|
| 226 | <label for="assignedPersons">Assigned Persons:</label> |
---|
| 227 | </td> |
---|
| 228 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'assignedPersons','errors')}"> |
---|
| 229 | |
---|
| 230 | <ul> |
---|
| 231 | <g:each var="a" in="${taskInstance?.assignedPersons?}"> |
---|
| 232 | <li><g:link controller="assignedPersonDetailed" action="edit" id="${a.id}" params="['task.id':taskInstance?.id]">${a?.encodeAsHTML()}</g:link></li> |
---|
| 233 | </g:each> |
---|
| 234 | </ul> |
---|
[96] | 235 | |
---|
[591] | 236 | </td> |
---|
| 237 | </tr> |
---|
| 238 | </g:if> |
---|
[96] | 239 | |
---|
[84] | 240 | </tbody> |
---|
| 241 | </table> |
---|
| 242 | </div> |
---|
| 243 | <div class="buttons"> |
---|
| 244 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
[213] | 245 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
[181] | 246 | <span class="button"><g:actionSubmit class="trash" onclick="return confirm('Are you sure?');" value="Trash" /></span> |
---|
[84] | 247 | </div> |
---|
| 248 | </g:form> |
---|
| 249 | </div> |
---|
| 250 | </body> |
---|
| 251 | </html> |
---|