| 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="save" method="post" > | 
|---|
| 24 |                 <div class="dialog"> | 
|---|
| 25 |                     <table> | 
|---|
| 26 |                         <tbody> | 
|---|
| 27 |                          | 
|---|
| 28 |                             <tr class="prop"> | 
|---|
| 29 |                                 <td valign="top" class="name"> | 
|---|
| 30 |                                     <label for="description">Description:</label> | 
|---|
| 31 |                                 </td> | 
|---|
| 32 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'description','errors')}"> | 
|---|
| 33 |                                     <input type="text"  class="description" maxlength="75" id="description" name="description" value="${fieldValue(bean:taskInstance,field:'description')}"/> | 
|---|
| 34 |                                     <g:helpBalloon class="helpballoon" code="task.description" /> | 
|---|
| 35 |                                 </td> | 
|---|
| 36 |                             </tr> | 
|---|
| 37 |                          | 
|---|
| 38 |                             <tr class="prop"> | 
|---|
| 39 |                                 <td valign="top" class="name"> | 
|---|
| 40 |                                     <label for="comment">Comment:</label> | 
|---|
| 41 |                                 </td> | 
|---|
| 42 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'comment','errors')}"> | 
|---|
| 43 |                                     <textarea  rows="5" cols="40" name="comment">${fieldValue(bean:taskInstance, field:'comment')}</textarea> | 
|---|
| 44 |                                     <g:helpBalloon class="helpballoon" code="task.comment" /> | 
|---|
| 45 |                                 </td> | 
|---|
| 46 |                             </tr>  | 
|---|
| 47 |                          | 
|---|
| 48 |                             <tr class="prop"> | 
|---|
| 49 |                                 <td valign="top" class="name"> | 
|---|
| 50 |                                     <label for="targetStartDate">Target Start Date:</label> | 
|---|
| 51 |                                 </td> | 
|---|
| 52 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetStartDate','errors')}"> | 
|---|
| 53 |                                     <richui:dateChooser name="targetStartDate" format="dd-MM-yyyy" value="${taskInstance.targetStartDate}" /> | 
|---|
| 54 |                                     <g:helpBalloon class="helpballoon" code="task.targetStartDate" /> | 
|---|
| 55 |                                 </td> | 
|---|
| 56 |                             </tr>  | 
|---|
| 57 |  | 
|---|
| 58 |                             <tr class="prop"> | 
|---|
| 59 |                                 <td valign="top" class="name"> | 
|---|
| 60 |                                     <label for="targetCompletionDate">Target Completion Date:</label> | 
|---|
| 61 |                                 </td> | 
|---|
| 62 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetCompletionDate','errors')}"> | 
|---|
| 63 |                                     <richui:dateChooser name="targetCompletionDate" format="dd-MM-yyyy" value="${taskInstance.targetCompletionDate}" /> | 
|---|
| 64 |                                     <g:helpBalloon class="helpballoon" code="task.targetCompletionDate" /> | 
|---|
| 65 |                                 </td> | 
|---|
| 66 |                             </tr> | 
|---|
| 67 |                          | 
|---|
| 68 |                             <tr class="prop"> | 
|---|
| 69 |                                 <td valign="top" class="name"> | 
|---|
| 70 |                                     <label for="leadPerson">Lead Person:</label> | 
|---|
| 71 |                                 </td> | 
|---|
| 72 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'leadPerson','errors')}"> | 
|---|
| 73 |                                     <g:select optionKey="id" from="${Person.list()}" name="leadPerson.id" value="${taskInstance?.leadPerson?.id}" ></g:select> | 
|---|
| 74 |                                     <g:helpBalloon code="task.leadPerson" /> | 
|---|
| 75 |                                 </td> | 
|---|
| 76 |                             </tr> | 
|---|
| 77 |                          | 
|---|
| 78 |                             <tr class="prop"> | 
|---|
| 79 |                                 <td valign="top" class="name"> | 
|---|
| 80 |                                     <label for="primaryAsset">Primary Asset:</label> | 
|---|
| 81 |                                 </td> | 
|---|
| 82 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}"> | 
|---|
| 83 |                                     <g:select optionKey="id" from="${Asset.list()}" name="primaryAsset.id" value="${taskInstance?.primaryAsset?.id}" noSelection="['null':'--None--']"></g:select> | 
|---|
| 84 |                                     <g:helpBalloon code="task.primaryAsset" /> | 
|---|
| 85 |                                 </td> | 
|---|
| 86 |                             </tr> | 
|---|
| 87 |  | 
|---|
| 88 |                             <tr class="prop"> | 
|---|
| 89 |                                 <td valign="top" class="name"> | 
|---|
| 90 |                                     <label for="associatedAssets">Associated Assets:</label> | 
|---|
| 91 |                                 </td> | 
|---|
| 92 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'associatedAssets','errors')}"> | 
|---|
| 93 |                                     <g:select id="associatedAssets" name="associatedAssets" | 
|---|
| 94 |                                                     from="${Asset.list()}" | 
|---|
| 95 |                                                     size="5" multiple="yes" optionKey="id" | 
|---|
| 96 |                                                     value="${taskInstance?.associatedAssets?.id}"  noSelection="['':'--None--']"/> | 
|---|
| 97 |                                     <g:helpBalloon code="task.associatedAssets" /> | 
|---|
| 98 |                                 </td> | 
|---|
| 99 |                             </tr> | 
|---|
| 100 |                          | 
|---|
| 101 |                             <tr class="prop"> | 
|---|
| 102 |                                 <td valign="top" class="name"> | 
|---|
| 103 |                                     <label for="taskPriority">Task Priority:</label> | 
|---|
| 104 |                                 </td> | 
|---|
| 105 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskPriority','errors')}"> | 
|---|
| 106 |                                     <g:select optionKey="id" from="${TaskPriority.list()}" name="taskPriority.id" value="${taskInstance?.taskPriority?.id}" ></g:select> | 
|---|
| 107 |                                 </td> | 
|---|
| 108 |                             </tr> | 
|---|
| 109 |                          | 
|---|
| 110 |                             <tr class="prop"> | 
|---|
| 111 |                                 <td valign="top" class="name"> | 
|---|
| 112 |                                     <label for="scheduled">Scheduled:</label> | 
|---|
| 113 |                                 </td> | 
|---|
| 114 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'scheduled','errors')}"> | 
|---|
| 115 |                                     <g:checkBox name="scheduled" value="${taskInstance?.scheduled}" ></g:checkBox> | 
|---|
| 116 |                                 </td> | 
|---|
| 117 |                             </tr> | 
|---|
| 118 |  | 
|---|
| 119 |                             <tr class="prop"> | 
|---|
| 120 |                                 <td valign="top" class="name"> | 
|---|
| 121 |                                     <label for="parentTask">Parent Task:</label> | 
|---|
| 122 |                                 </td> | 
|---|
| 123 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'parentTask','errors')}"> | 
|---|
| 124 |                                     <g:select optionKey="id" from="${Task.findAllByTrash(false)}" name="parentTask.id" value="${taskInstance?.parentTask?.id}" noSelection="['null':'--None--']"></g:select> | 
|---|
| 125 |                                 </td> | 
|---|
| 126 |                             </tr>  | 
|---|
| 127 |                          | 
|---|
| 128 |                             <tr class="prop"> | 
|---|
| 129 |                                 <td valign="top" class="name"> | 
|---|
| 130 |                                     <label for="taskGroup">Task Group:</label> | 
|---|
| 131 |                                 </td> | 
|---|
| 132 |                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskGroup','errors')}"> | 
|---|
| 133 |                                     <g:select optionKey="id" from="${TaskGroup.list()}" name="taskGroup.id" value="${taskInstance?.taskGroup?.id}" ></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" from="${TaskType.list()}" name="taskType.id" value="${taskInstance?.taskType?.id}" ></g:select> | 
|---|
| 143 |                                 </td> | 
|---|
| 144 |                             </tr>  | 
|---|
| 145 |                          | 
|---|
| 146 |                         </tbody> | 
|---|
| 147 |                     </table> | 
|---|
| 148 |                 </div> | 
|---|
| 149 |                 <div class="buttons"> | 
|---|
| 150 |                     <span class="button"><input class="save" type="submit" value="Create" /></span> | 
|---|
| 151 |                 </div> | 
|---|
| 152 |             </g:form> | 
|---|
| 153 |         </div> | 
|---|
| 154 |     </body> | 
|---|
| 155 | </html> | 
|---|