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:render template="/shared/messages" /> |
---|
15 | <g:hasErrors bean="${taskInstance}"> |
---|
16 | <div class="errors"> |
---|
17 | <g:renderErrors bean="${taskInstance}" as="list" /> |
---|
18 | </div> |
---|
19 | </g:hasErrors> |
---|
20 | |
---|
21 | <g:form action="save" method="post" name="createTaskForm"> |
---|
22 | <div class="dialog"> |
---|
23 | <table> |
---|
24 | <tbody> |
---|
25 | |
---|
26 | <tr class="prop"> |
---|
27 | <td valign="top" class="name"> |
---|
28 | <label for="description">Description:</label> |
---|
29 | </td> |
---|
30 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'description','errors')}"> |
---|
31 | <input type="text" class="description" maxlength="75" id="description" name="description" value="${fieldValue(bean:taskInstance,field:'description')}"/> |
---|
32 | <g:helpBalloon class="helpballoon" code="task.description" /> |
---|
33 | </td> |
---|
34 | </tr> |
---|
35 | |
---|
36 | <tr class="prop"> |
---|
37 | <td valign="top" class="name"> |
---|
38 | <label for="comment">Comment:</label> |
---|
39 | </td> |
---|
40 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'comment','errors')}"> |
---|
41 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:taskInstance, field:'comment')}</textarea> |
---|
42 | <g:helpBalloon class="helpballoon" code="task.comment" /> |
---|
43 | </td> |
---|
44 | </tr> |
---|
45 | |
---|
46 | <tr class="prop"> |
---|
47 | <td valign="top" class="name"> |
---|
48 | <label for="targetStartDate">Target Start Date:</label> |
---|
49 | </td> |
---|
50 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetStartDate','errors')}"> |
---|
51 | <richui:dateChooser name="targetStartDate" format="dd-MM-yyyy" value="${taskInstance.targetStartDate}" /> |
---|
52 | <g:helpBalloon class="helpballoon" code="task.targetStartDate" /> |
---|
53 | </td> |
---|
54 | </tr> |
---|
55 | |
---|
56 | <tr class="prop"> |
---|
57 | <td valign="top" class="name"> |
---|
58 | <label for="targetCompletionDate">Target Completion Date:</label> |
---|
59 | </td> |
---|
60 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetCompletionDate','errors')}"> |
---|
61 | <richui:dateChooser name="targetCompletionDate" format="dd-MM-yyyy" value="${taskInstance.targetCompletionDate}" /> |
---|
62 | <g:helpBalloon class="helpballoon" code="task.targetCompletionDate" /> |
---|
63 | </td> |
---|
64 | </tr> |
---|
65 | |
---|
66 | <tr class="prop"> |
---|
67 | <td valign="top" class="name"> |
---|
68 | <label for="leadPerson">Lead Person:</label> |
---|
69 | </td> |
---|
70 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'leadPerson','errors')}"> |
---|
71 | <g:select optionKey="id" |
---|
72 | from="${Person.findAllByIsActive(true).sort { p1, p2 -> p1.firstName.compareToIgnoreCase(p2.firstName) }}" |
---|
73 | name="leadPerson.id" |
---|
74 | value="${taskInstance?.leadPerson?.id}" > |
---|
75 | </g:select> |
---|
76 | <g:helpBalloon code="task.leadPerson" /> |
---|
77 | </td> |
---|
78 | </tr> |
---|
79 | |
---|
80 | <tr class="prop"> |
---|
81 | <td valign="top" class="name"> |
---|
82 | <label for="primaryAsset">Primary Asset:</label> |
---|
83 | </td> |
---|
84 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}"> |
---|
85 | <g:select optionKey="id" |
---|
86 | from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
87 | name="primaryAsset.id" |
---|
88 | value="${taskInstance?.primaryAsset?.id}" |
---|
89 | noSelection="['null':/${g.message(code:'default.none.select.text')}/]"> |
---|
90 | </g:select> |
---|
91 | <g:helpBalloon code="task.primaryAsset" /> |
---|
92 | </td> |
---|
93 | </tr> |
---|
94 | |
---|
95 | <tr class="prop"> |
---|
96 | <td valign="top" class="name"> |
---|
97 | <label for="associatedAssets">Associated Assets:</label> |
---|
98 | </td> |
---|
99 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'associatedAssets','errors')}"> |
---|
100 | <g:select id="associatedAssets" name="associatedAssets" |
---|
101 | from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
102 | size="5" multiple="yes" optionKey="id" |
---|
103 | value="${taskInstance?.associatedAssets?.id}" |
---|
104 | noSelection="['':/${g.message(code:'default.none.select.text')}/]"> |
---|
105 | </g:select> |
---|
106 | <g:helpBalloon code="task.associatedAssets" /> |
---|
107 | </td> |
---|
108 | </tr> |
---|
109 | |
---|
110 | <tr class="prop"> |
---|
111 | <td valign="top" class="name"> |
---|
112 | <label for="taskPriority">Task Priority:</label> |
---|
113 | </td> |
---|
114 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskPriority','errors')}"> |
---|
115 | <g:select optionKey="id" |
---|
116 | from="${scheduledTaskPriorities}" |
---|
117 | name="taskPriority.id" |
---|
118 | value="${taskInstance?.taskPriority?.id}" > |
---|
119 | </g:select> |
---|
120 | </td> |
---|
121 | </tr> |
---|
122 | |
---|
123 | <tr class="prop"> |
---|
124 | <td valign="top" class="name"> |
---|
125 | <label for="taskGroup">Task Group:</label> |
---|
126 | </td> |
---|
127 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskGroup','errors')}"> |
---|
128 | <g:select optionKey="id" |
---|
129 | from="${TaskGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
130 | name="taskGroup.id" |
---|
131 | value="${taskInstance?.taskGroup?.id}" |
---|
132 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
133 | </g:select> |
---|
134 | </td> |
---|
135 | </tr> |
---|
136 | |
---|
137 | <tr class="prop"> |
---|
138 | <td valign="top" class="name"> |
---|
139 | <label for="taskType">Task Type:</label> |
---|
140 | </td> |
---|
141 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskType','errors')}"> |
---|
142 | <g:select optionKey="id" |
---|
143 | from="${scheduledTaskTypes}" |
---|
144 | name="taskType.id" |
---|
145 | value="${taskInstance?.taskType?.id}" |
---|
146 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
147 | </g:select> |
---|
148 | </td> |
---|
149 | </tr> |
---|
150 | |
---|
151 | <tr class="prop"> |
---|
152 | <td valign="top" class="name"> |
---|
153 | <label for="safetyRequirement">Safety:</label> |
---|
154 | </td> |
---|
155 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'safetyRequirement','errors')}"> |
---|
156 | <g:checkBox name="safetyRequirement" value="${taskInstance?.safetyRequirement}" ></g:checkBox> |
---|
157 | <g:helpBalloon code="task.safetyRequirement" /> |
---|
158 | </td> |
---|
159 | </tr> |
---|
160 | |
---|
161 | <tr class="prop"> |
---|
162 | <td valign="top" class="name"> |
---|
163 | <label for="regulatoryRequirement">Regulatory:</label> |
---|
164 | </td> |
---|
165 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'regulatoryRequirement','errors')}"> |
---|
166 | <g:checkBox name="regulatoryRequirement" value="${taskInstance?.regulatoryRequirement}" ></g:checkBox> |
---|
167 | <g:helpBalloon code="task.regulatoryRequirement" /> |
---|
168 | </td> |
---|
169 | </tr> |
---|
170 | |
---|
171 | <tr class="prop"> |
---|
172 | <td valign="top" class="name"> |
---|
173 | <label for="mandatoryRequirement">Mandatory:</label> |
---|
174 | </td> |
---|
175 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'mandatoryRequirement','errors')}"> |
---|
176 | <g:checkBox name="mandatoryRequirement" value="${taskInstance?.mandatoryRequirement}" ></g:checkBox> |
---|
177 | <g:helpBalloon code="task.mandatoryRequirement" /> |
---|
178 | </td> |
---|
179 | </tr> |
---|
180 | |
---|
181 | <tr class="prop"> |
---|
182 | <td valign="top" class="name"> |
---|
183 | <label for="positiveFault">Positive Fault:</label> |
---|
184 | </td> |
---|
185 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'positiveFault','errors')}"> |
---|
186 | <g:checkBox name="positiveFault" value="${taskInstance?.positiveFault}" ></g:checkBox> |
---|
187 | <g:helpBalloon code="task.positiveFault" /> |
---|
188 | </td> |
---|
189 | </tr> |
---|
190 | |
---|
191 | </tbody> |
---|
192 | </table> |
---|
193 | </div> |
---|
194 | <div class="buttons"> |
---|
195 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
196 | </div> |
---|
197 | </g:form> |
---|
198 | </div> |
---|
199 | </body> |
---|
200 | </html> |
---|