[66] | 1 | |
---|
| 2 | |
---|
| 3 | <html> |
---|
| 4 | <head> |
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
| 6 | <meta name="layout" content="main" /> |
---|
[178] | 7 | <title>Create Entry</title> |
---|
[66] | 8 | </head> |
---|
| 9 | <body> |
---|
| 10 | <div class="nav"> |
---|
| 11 | <span class="menuButton"><g:link class="list" action="list">Entry List</g:link></span> |
---|
| 12 | </div> |
---|
| 13 | <div class="body"> |
---|
| 14 | <h1>Create Entry</h1> |
---|
| 15 | <g:if test="${flash.message}"> |
---|
| 16 | <div class="message">${flash.message}</div> |
---|
| 17 | </g:if> |
---|
| 18 | <g:hasErrors bean="${entryInstance}"> |
---|
| 19 | <div class="errors"> |
---|
| 20 | <g:renderErrors bean="${entryInstance}" as="list" /> |
---|
| 21 | </div> |
---|
| 22 | </g:hasErrors> |
---|
| 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="task">Task:</label> |
---|
| 31 | </td> |
---|
| 32 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'task','errors')}"> |
---|
| 33 | <g:select optionKey="id" from="${Task.list()}" name="task.id" value="${entryInstance?.task?.id}" ></g:select> |
---|
| 34 | </td> |
---|
| 35 | </tr> |
---|
| 36 | |
---|
| 37 | <tr class="prop"> |
---|
| 38 | <td valign="top" class="name"> |
---|
| 39 | <label for="comment">Comment:</label> |
---|
| 40 | </td> |
---|
| 41 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'comment','errors')}"> |
---|
| 42 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:entryInstance, field:'comment')}</textarea> |
---|
| 43 | </td> |
---|
| 44 | </tr> |
---|
| 45 | |
---|
| 46 | <tr class="prop"> |
---|
| 47 | <td valign="top" class="name"> |
---|
| 48 | <label for="dateDone">Date Done:</label> |
---|
| 49 | </td> |
---|
| 50 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'dateDone','errors')}"> |
---|
[178] | 51 | <g:datePicker name="dateDone" value="${entryInstance?.dateDone}" precision="minute" ></g:datePicker> |
---|
[66] | 52 | </td> |
---|
| 53 | </tr> |
---|
| 54 | |
---|
| 55 | <tr class="prop"> |
---|
| 56 | <td valign="top" class="name"> |
---|
| 57 | <label for="durationHour">Duration Hour:</label> |
---|
| 58 | </td> |
---|
| 59 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'durationHour','errors')}"> |
---|
| 60 | <input type="text" id="durationHour" name="durationHour" value="${fieldValue(bean:entryInstance,field:'durationHour')}" /> |
---|
| 61 | </td> |
---|
| 62 | </tr> |
---|
| 63 | |
---|
| 64 | <tr class="prop"> |
---|
| 65 | <td valign="top" class="name"> |
---|
| 66 | <label for="durationMinute">Duration Minute:</label> |
---|
| 67 | </td> |
---|
| 68 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}"> |
---|
| 69 | <input type="text" id="durationMinute" name="durationMinute" value="${fieldValue(bean:entryInstance,field:'durationMinute')}" /> |
---|
| 70 | </td> |
---|
| 71 | </tr> |
---|
| 72 | |
---|
| 73 | <tr class="prop"> |
---|
| 74 | <td valign="top" class="name"> |
---|
| 75 | <label for="dateEntered">Date Entered:</label> |
---|
| 76 | </td> |
---|
| 77 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'dateEntered','errors')}"> |
---|
[178] | 78 | <g:datePicker name="dateEntered" value="${entryInstance?.dateEntered}" precision="minute" ></g:datePicker> |
---|
[66] | 79 | </td> |
---|
| 80 | </tr> |
---|
| 81 | |
---|
| 82 | <tr class="prop"> |
---|
| 83 | <td valign="top" class="name"> |
---|
| 84 | <label for="enteredBy">Entered By:</label> |
---|
| 85 | </td> |
---|
| 86 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'enteredBy','errors')}"> |
---|
| 87 | <g:select optionKey="id" from="${Person.list()}" name="enteredBy.id" value="${entryInstance?.enteredBy?.id}" ></g:select> |
---|
| 88 | </td> |
---|
| 89 | </tr> |
---|
| 90 | |
---|
| 91 | <tr class="prop"> |
---|
| 92 | <td valign="top" class="name"> |
---|
| 93 | <label for="entryType">Entry Type:</label> |
---|
| 94 | </td> |
---|
| 95 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'entryType','errors')}"> |
---|
| 96 | <g:select optionKey="id" from="${EntryType.list()}" name="entryType.id" value="${entryInstance?.entryType?.id}" ></g:select> |
---|
| 97 | </td> |
---|
| 98 | </tr> |
---|
| 99 | |
---|
| 100 | </tbody> |
---|
| 101 | </table> |
---|
| 102 | </div> |
---|
| 103 | <div class="buttons"> |
---|
| 104 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
| 105 | </div> |
---|
| 106 | </g:form> |
---|
| 107 | </div> |
---|
| 108 | </body> |
---|
| 109 | </html> |
---|