[433] | 1 | <html> |
---|
| 2 | <head> |
---|
| 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
| 4 | <meta name="layout" content="main" /> |
---|
| 5 | <title>Create Task</title> |
---|
| 6 | <nav:resources override="true"/> |
---|
| 7 | <resource:dateChooser /> |
---|
| 8 | </head> |
---|
| 9 | <body onload="document.createTaskForm.description.focus();"> |
---|
| 10 | <div class="nav"> |
---|
| 11 | <nav:renderSubItems group="nav"/> |
---|
| 12 | </div> |
---|
| 13 | <div class="body"> |
---|
| 14 | <g:if test="${flash.message}"> |
---|
| 15 | <div class="message">${flash.message}</div> |
---|
| 16 | </g:if> |
---|
| 17 | <g:hasErrors bean="${taskInstance}"> |
---|
| 18 | <div class="errors"> |
---|
| 19 | <g:renderErrors bean="${taskInstance}" as="list" /> |
---|
| 20 | </div> |
---|
| 21 | </g:hasErrors> |
---|
| 22 | |
---|
| 23 | <g:form action="saveUnscheduled" method="post" name="createTaskForm"> |
---|
| 24 | <div class="dialog"> |
---|
| 25 | <table> |
---|
| 26 | <tbody> |
---|
| 27 | |
---|
| 28 | <tr class="prop"> |
---|
| 29 | <td valign="top" class="name"> |
---|
[872] | 30 | <label for="primaryAsset">Asset:</label> |
---|
| 31 | </td> |
---|
| 32 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}"> |
---|
| 33 | <g:select optionKey="id" |
---|
| 34 | from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
| 35 | name="primaryAsset.id" |
---|
| 36 | value="${taskInstance?.primaryAsset?.id}" |
---|
| 37 | noSelection="['null':/${g.message(code:'default.none.select.text')}/]"> |
---|
| 38 | </g:select> |
---|
| 39 | <g:helpBalloon code="task.primaryAsset" /> |
---|
| 40 | </td> |
---|
| 41 | </tr> |
---|
| 42 | |
---|
| 43 | <tr class="prop"> |
---|
| 44 | <td valign="top" class="name"> |
---|
[433] | 45 | <label for="description">Description:</label> |
---|
| 46 | </td> |
---|
| 47 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'description','errors')}"> |
---|
| 48 | <input type="text" class="description" maxlength="75" id="description" name="description" value="${fieldValue(bean:taskInstance,field:'description')}"/> |
---|
| 49 | <g:helpBalloon class="helpballoon" code="task.description" /> |
---|
| 50 | </td> |
---|
| 51 | </tr> |
---|
| 52 | |
---|
| 53 | <tr class="prop"> |
---|
| 54 | <td valign="top" class="name"> |
---|
| 55 | <label for="comment">Comment:</label> |
---|
| 56 | </td> |
---|
| 57 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'comment','errors')}"> |
---|
| 58 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:taskInstance, field:'comment')}</textarea> |
---|
| 59 | <g:helpBalloon class="helpballoon" code="task.comment" /> |
---|
| 60 | </td> |
---|
| 61 | </tr> |
---|
| 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')}"> |
---|
| 68 | <richui:dateChooser name="targetStartDate" format="dd-MM-yyyy" value="${taskInstance.targetStartDate}" /> |
---|
| 69 | <g:helpBalloon class="helpballoon" code="task.targetStartDate" /> |
---|
| 70 | </td> |
---|
| 71 | </tr> |
---|
| 72 | |
---|
| 73 | <tr class="prop"> |
---|
| 74 | <td valign="top" class="name"> |
---|
| 75 | <label for="targetCompletionDate">Target Completion Date:</label> |
---|
| 76 | </td> |
---|
| 77 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetCompletionDate','errors')}"> |
---|
| 78 | <richui:dateChooser name="targetCompletionDate" format="dd-MM-yyyy" value="${taskInstance.targetCompletionDate}" /> |
---|
| 79 | <g:helpBalloon class="helpballoon" code="task.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')}"> |
---|
[487] | 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> |
---|
[433] | 93 | <g:helpBalloon code="task.leadPerson" /> |
---|
| 94 | </td> |
---|
| 95 | </tr> |
---|
| 96 | |
---|
| 97 | <tr class="prop"> |
---|
| 98 | <td valign="top" class="name"> |
---|
| 99 | <label for="taskPriority">Task Priority:</label> |
---|
| 100 | </td> |
---|
| 101 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskPriority','errors')}"> |
---|
[487] | 102 | <g:select optionKey="id" |
---|
| 103 | from="${unscheduledTaskPriorities}" |
---|
| 104 | name="taskPriority.id" |
---|
| 105 | value="${taskInstance?.taskPriority?.id}" > |
---|
| 106 | </g:select> |
---|
[433] | 107 | </td> |
---|
| 108 | </tr> |
---|
| 109 | |
---|
| 110 | <tr class="prop"> |
---|
| 111 | <td valign="top" class="name"> |
---|
| 112 | <label for="taskGroup">Task Group:</label> |
---|
| 113 | </td> |
---|
| 114 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskGroup','errors')}"> |
---|
[487] | 115 | <g:select optionKey="id" |
---|
| 116 | from="${TaskGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
| 117 | name="taskGroup.id" |
---|
[601] | 118 | value="${taskInstance?.taskGroup?.id}" |
---|
| 119 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
[487] | 120 | </g:select> |
---|
[433] | 121 | </td> |
---|
| 122 | </tr> |
---|
| 123 | |
---|
| 124 | <tr class="prop"> |
---|
| 125 | <td valign="top" class="name"> |
---|
| 126 | <label for="taskType">Task Type:</label> |
---|
| 127 | </td> |
---|
| 128 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskType','errors')}"> |
---|
| 129 | ${taskInstance.taskType.encodeAsHTML()} |
---|
| 130 | </td> |
---|
[913] | 131 | </tr> |
---|
| 132 | |
---|
| 133 | <g:ifAnyGranted role="ROLE_AppAdmin,ROLE_Manager,ROLE_TaskManager"> |
---|
| 134 | <tr class="prop"> |
---|
| 135 | <td valign="top" class="name"> |
---|
| 136 | <label for="safetyRequirement">Safety Requirement:</label> |
---|
| 137 | </td> |
---|
| 138 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'safetyRequirement','errors')}"> |
---|
| 139 | <g:checkBox name="safetyRequirement" value="${taskInstance?.safetyRequirement}" ></g:checkBox> |
---|
| 140 | <g:helpBalloon code="task.safetyRequirement" /> |
---|
| 141 | </td> |
---|
| 142 | </tr> |
---|
| 143 | |
---|
| 144 | <tr class="prop"> |
---|
| 145 | <td valign="top" class="name"> |
---|
| 146 | <label for="regulatoryRequirement">Regulatory Requirement:</label> |
---|
| 147 | </td> |
---|
| 148 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'regulatoryRequirement','errors')}"> |
---|
| 149 | <g:checkBox name="regulatoryRequirement" value="${taskInstance?.regulatoryRequirement}" ></g:checkBox> |
---|
| 150 | <g:helpBalloon code="task.regulatoryRequirement" /> |
---|
| 151 | </td> |
---|
| 152 | </tr> |
---|
| 153 | |
---|
| 154 | <tr class="prop"> |
---|
| 155 | <td valign="top" class="name"> |
---|
| 156 | <label for="mandatoryRequirement">Mandatory Requirement:</label> |
---|
| 157 | </td> |
---|
| 158 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'mandatoryRequirement','errors')}"> |
---|
| 159 | <g:checkBox name="mandatoryRequirement" value="${taskInstance?.mandatoryRequirement}" ></g:checkBox> |
---|
| 160 | <g:helpBalloon code="task.mandatoryRequirement" /> |
---|
| 161 | </td> |
---|
| 162 | </tr> |
---|
| 163 | |
---|
| 164 | <tr class="prop"> |
---|
| 165 | <td valign="top" class="name"> |
---|
| 166 | <label for="positiveFault">Positive Fault:</label> |
---|
| 167 | </td> |
---|
| 168 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'positiveFault','errors')}"> |
---|
| 169 | <g:checkBox name="positiveFault" value="${taskInstance?.positiveFault}" ></g:checkBox> |
---|
| 170 | <g:helpBalloon code="task.positiveFault" /> |
---|
| 171 | </td> |
---|
| 172 | </tr> |
---|
| 173 | </g:ifAnyGranted> |
---|
[433] | 174 | |
---|
| 175 | </tbody> |
---|
| 176 | </table> |
---|
| 177 | </div> |
---|
| 178 | <div class="buttons"> |
---|
| 179 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
| 180 | </div> |
---|
| 181 | </g:form> |
---|
| 182 | </div> |
---|
| 183 | </body> |
---|
| 184 | </html> |
---|