[92] | 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> |
---|
[147] | 8 | <resource:dateChooser /> |
---|
[92] | 9 | </head> |
---|
| 10 | <body> |
---|
| 11 | <div class="nav"> |
---|
[147] | 12 | <h1>Edit Entry</h1> |
---|
[92] | 13 | </div> |
---|
| 14 | <div class="body"> |
---|
| 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 method="post" > |
---|
| 24 | <input type="hidden" name="id" value="${entryInstance?.id}" /> |
---|
| 25 | <div class="dialog"> |
---|
| 26 | <table> |
---|
| 27 | <tbody> |
---|
| 28 | |
---|
| 29 | <tr class="prop"> |
---|
| 30 | <td valign="top" class="name"> |
---|
| 31 | <label for="task">Task:</label> |
---|
| 32 | </td> |
---|
| 33 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'task','errors')}"> |
---|
| 34 | <g:select optionKey="id" from="${Task.list()}" name="task.id" value="${entryInstance?.task?.id}" ></g:select> |
---|
| 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:entryInstance,field:'comment','errors')}"> |
---|
| 43 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:entryInstance, field:'comment')}</textarea> |
---|
| 44 | </td> |
---|
| 45 | </tr> |
---|
| 46 | |
---|
| 47 | <tr class="prop"> |
---|
| 48 | <td valign="top" class="name"> |
---|
| 49 | <label for="dateDone">Date Done:</label> |
---|
| 50 | </td> |
---|
| 51 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'dateDone','errors')}"> |
---|
[147] | 52 | <richui:dateChooser name="dateDone" format="dd-MM-yyyy" value="${entryInstance?.dateDone}" /> |
---|
[92] | 53 | </td> |
---|
| 54 | </tr> |
---|
| 55 | |
---|
| 56 | <tr class="prop"> |
---|
| 57 | <td valign="top" class="name"> |
---|
[98] | 58 | <label for="durationHour">Duration:</label> |
---|
[92] | 59 | </td> |
---|
[98] | 60 | |
---|
| 61 | <td valign="top" class="value"> |
---|
[137] | 62 | <input class="time ${hasErrors(bean:entryInstance,field:'durationHour','errors')}" |
---|
[98] | 63 | type="text" id="durationHour" name="durationHour" |
---|
| 64 | value="${fieldValue(bean:entryInstance,field:'durationHour')}" /> |
---|
| 65 | : |
---|
[137] | 66 | <input class="time ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}" |
---|
[98] | 67 | type="text" id="durationMinute" name="durationMinute" |
---|
| 68 | value="${fieldValue(bean:entryInstance,field:'durationMinute')}" /> |
---|
| 69 | <g:helpBalloon code="entry.duration" /> |
---|
| 70 | </td> |
---|
| 71 | </tr> |
---|
[92] | 72 | |
---|
| 73 | <tr class="prop"> |
---|
| 74 | <td valign="top" class="name"> |
---|
| 75 | <label for="dateEntered">Date Entered:</label> |
---|
| 76 | </td> |
---|
[98] | 77 | <td valign="top" class="value"> |
---|
[139] | 78 | <g:formatDate date="${entryInstance?.dateEntered}" format="EEE, dd-MMM-yyyy @ HH:mm"/> |
---|
[92] | 79 | </td> |
---|
| 80 | </tr> |
---|
| 81 | |
---|
| 82 | <tr class="prop"> |
---|
| 83 | <td valign="top" class="name"> |
---|
| 84 | <label for="enteredBy">Entered By:</label> |
---|
| 85 | </td> |
---|
[98] | 86 | <td valign="top" class="value"> |
---|
| 87 | ${entryInstance?.enteredBy?.toString()} |
---|
[92] | 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"><g:actionSubmit class="save" value="Update" /></span> |
---|
| 105 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 106 | </div> |
---|
| 107 | </g:form> |
---|
| 108 | </div> |
---|
| 109 | </body> |
---|
| 110 | </html> |
---|