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