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 | <g:hiddenField name="task.id" value="${entryInstance.task.id}" /> |
---|
26 | <div class="dialog"> |
---|
27 | <table> |
---|
28 | <tbody> |
---|
29 | |
---|
30 | <tr class="prop"> |
---|
31 | <td valign="top" class="name"> |
---|
32 | <label for="task">Task:</label> |
---|
33 | </td> |
---|
34 | <td valign="top" class="name"> |
---|
35 | ${entryInstance?.task?.description} |
---|
36 | </td> |
---|
37 | </tr> |
---|
38 | |
---|
39 | <tr class="prop"> |
---|
40 | <td valign="top" class="name"> |
---|
41 | <label for="comment">Comment:</label> |
---|
42 | </td> |
---|
43 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'comment','errors')}"> |
---|
44 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:entryInstance, field:'comment')}</textarea> |
---|
45 | </td> |
---|
46 | </tr> |
---|
47 | |
---|
48 | <tr class="prop"> |
---|
49 | <td valign="top" class="name"> |
---|
50 | <label for="dateDone">Date Done:</label> |
---|
51 | </td> |
---|
52 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'dateDone','errors')}"> |
---|
53 | <g:datePicker name="dateDone" value="${entryInstance?.dateDone}" precision="day"></g:datePicker> |
---|
54 | </td> |
---|
55 | </tr> |
---|
56 | |
---|
57 | <tr class="prop"> |
---|
58 | <td valign="top" class="name"> |
---|
59 | <label for="durationHour">Duration:</label> |
---|
60 | </td> |
---|
61 | |
---|
62 | <td valign="top" class="value"> |
---|
63 | <input class="duration ${hasErrors(bean:entryInstance,field:'durationHour','errors')}" |
---|
64 | type="text" id="durationHour" name="durationHour" |
---|
65 | value="${fieldValue(bean:entryInstance,field:'durationHour')}" /> |
---|
66 | : |
---|
67 | <input class="duration ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}" |
---|
68 | type="text" id="durationMinute" name="durationMinute" |
---|
69 | value="${fieldValue(bean:entryInstance,field:'durationMinute')}" /> |
---|
70 | <g:helpBalloon code="entry.duration" /> |
---|
71 | </td> |
---|
72 | </tr> |
---|
73 | |
---|
74 | <tr class="prop"> |
---|
75 | <td valign="top" class="name"> |
---|
76 | <label for="entryType">Entry Type:</label> |
---|
77 | </td> |
---|
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> |
---|
80 | </td> |
---|
81 | </tr> |
---|
82 | |
---|
83 | </tbody> |
---|
84 | </table> |
---|
85 | </div> |
---|
86 | <div class="buttons"> |
---|
87 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
88 | </div> |
---|
89 | </g:form> |
---|
90 | </div> |
---|
91 | </body> |
---|
92 | </html> |
---|