| 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}" /> | 
|---|
| 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')}"> | 
|---|
| 54 | <g:datePicker name="dateDone" value="${entryInstance?.dateDone}" precision="day"></g:datePicker> | 
|---|
| 55 | </td> | 
|---|
| 56 | </tr> | 
|---|
| 57 |  | 
|---|
| 58 | <tr class="prop"> | 
|---|
| 59 | <td valign="top" class="name"> | 
|---|
| 60 | <label for="durationHour">Duration:</label> | 
|---|
| 61 | </td> | 
|---|
| 62 |  | 
|---|
| 63 | <td valign="top" class="value"> | 
|---|
| 64 | <input class="duration ${hasErrors(bean:entryInstance,field:'durationHour','errors')}" | 
|---|
| 65 | type="text" id="durationHour" name="durationHour" | 
|---|
| 66 | value="${fieldValue(bean:entryInstance,field:'durationHour')}" /> | 
|---|
| 67 | : | 
|---|
| 68 | <input class="duration ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}" | 
|---|
| 69 | type="text" id="durationMinute" name="durationMinute" | 
|---|
| 70 | value="${fieldValue(bean:entryInstance,field:'durationMinute')}" /> | 
|---|
| 71 | <g:helpBalloon code="entry.duration" /> | 
|---|
| 72 | </td> | 
|---|
| 73 | </tr> | 
|---|
| 74 |  | 
|---|
| 75 | <tr class="prop"> | 
|---|
| 76 | <td valign="top" class="name"> | 
|---|
| 77 | <label for="dateEntered">Date Entered:</label> | 
|---|
| 78 | </td> | 
|---|
| 79 | <td valign="top" class="value"> | 
|---|
| 80 | <g:formatDate date="${entryInstance?.dateEntered}" format="EEE, dd MMM yyyy @ HH:mm"/> | 
|---|
| 81 | </td> | 
|---|
| 82 | </tr> | 
|---|
| 83 |  | 
|---|
| 84 | <tr class="prop"> | 
|---|
| 85 | <td valign="top" class="name"> | 
|---|
| 86 | <label for="enteredBy">Entered By:</label> | 
|---|
| 87 | </td> | 
|---|
| 88 | <td valign="top" class="value"> | 
|---|
| 89 | ${entryInstance?.enteredBy?.toString()} | 
|---|
| 90 | </td> | 
|---|
| 91 | </tr> | 
|---|
| 92 |  | 
|---|
| 93 | <tr class="prop"> | 
|---|
| 94 | <td valign="top" class="name"> | 
|---|
| 95 | <label for="entryType">Entry Type:</label> | 
|---|
| 96 | </td> | 
|---|
| 97 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'entryType','errors')}"> | 
|---|
| 98 | <g:select optionKey="id" from="${EntryType.list()}" name="entryType.id" value="${entryInstance?.entryType?.id}" ></g:select> | 
|---|
| 99 | </td> | 
|---|
| 100 | </tr> | 
|---|
| 101 |  | 
|---|
| 102 | </tbody> | 
|---|
| 103 | </table> | 
|---|
| 104 | </div> | 
|---|
| 105 | <div class="buttons"> | 
|---|
| 106 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> | 
|---|
| 107 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> | 
|---|
| 108 | </div> | 
|---|
| 109 | </g:form> | 
|---|
| 110 | </div> | 
|---|
| 111 | </body> | 
|---|
| 112 | </html> | 
|---|