[21] | 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>Create 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 | </div> |
---|
| 14 | <div class="body"> |
---|
| 15 | <h1>Create 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 action="save" method="post" > |
---|
[49] | 25 | <g:hiddenField name="task.id" value="${entryInstance.task.id}" /> |
---|
[21] | 26 | <div class="dialog"> |
---|
| 27 | <table> |
---|
| 28 | <tbody> |
---|
| 29 | |
---|
| 30 | <tr class="prop"> |
---|
| 31 | <td valign="top" class="name"> |
---|
[39] | 32 | <label for="task">Task:</label> |
---|
| 33 | </td> |
---|
[49] | 34 | <td valign="top" class="name"> |
---|
| 35 | ${entryInstance?.task?.name} |
---|
[39] | 36 | </td> |
---|
[49] | 37 | </tr> |
---|
| 38 | |
---|
[39] | 39 | <tr class="prop"> |
---|
| 40 | <td valign="top" class="name"> |
---|
[49] | 41 | <label for="date">Date:</label> |
---|
[21] | 42 | </td> |
---|
[49] | 43 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'date','errors')}"> |
---|
| 44 | <g:datePicker name="date" precision='day' value="${entryInstance?.date}" ></g:datePicker> |
---|
[21] | 45 | </td> |
---|
| 46 | </tr> |
---|
| 47 | |
---|
| 48 | <tr class="prop"> |
---|
| 49 | <td valign="top" class="name"> |
---|
[49] | 50 | <label for="comments">Comments:</label> |
---|
[21] | 51 | </td> |
---|
[49] | 52 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'comments','errors')}"> |
---|
| 53 | <textarea rows="5" cols="40" name="comments">${fieldValue(bean:entryInstance, field:'comments')}</textarea> |
---|
[21] | 54 | </td> |
---|
| 55 | </tr> |
---|
| 56 | |
---|
[49] | 57 | |
---|
| 58 | |
---|
[21] | 59 | <tr class="prop"> |
---|
| 60 | <td valign="top" class="name"> |
---|
[39] | 61 | <label for="durationHours">Duration Hours:</label> |
---|
[21] | 62 | </td> |
---|
[39] | 63 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'durationHours','errors')}"> |
---|
| 64 | <input type="text" id="durationHours" name="durationHours" value="${fieldValue(bean:entryInstance,field:'durationHours')}" /> |
---|
[21] | 65 | </td> |
---|
| 66 | </tr> |
---|
| 67 | |
---|
| 68 | <tr class="prop"> |
---|
| 69 | <td valign="top" class="name"> |
---|
[39] | 70 | <label for="durationMinutes">Duration Minutes:</label> |
---|
| 71 | </td> |
---|
| 72 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'durationMinutes','errors')}"> |
---|
| 73 | <input type="text" id="durationMinutes" name="durationMinutes" value="${fieldValue(bean:entryInstance,field:'durationMinutes')}" /> |
---|
| 74 | </td> |
---|
| 75 | </tr> |
---|
| 76 | |
---|
| 77 | <tr class="prop"> |
---|
| 78 | <td valign="top" class="name"> |
---|
[25] | 79 | <label for="entryType">Entry Type:</label> |
---|
[21] | 80 | </td> |
---|
[25] | 81 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'entryType','errors')}"> |
---|
| 82 | <g:select optionKey="id" from="${EntryType.list()}" name="entryType.id" value="${entryInstance?.entryType?.id}" ></g:select> |
---|
[21] | 83 | </td> |
---|
| 84 | </tr> |
---|
| 85 | |
---|
| 86 | </tbody> |
---|
| 87 | </table> |
---|
| 88 | </div> |
---|
| 89 | <div class="buttons"> |
---|
| 90 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
| 91 | </div> |
---|
| 92 | </g:form> |
---|
| 93 | </div> |
---|
| 94 | </body> |
---|
| 95 | </html> |
---|