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