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