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 style="width:450px" 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 Hour:</label> |
---|
60 | </td> |
---|
61 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'durationHour','errors')}"> |
---|
62 | <input type="text" id="durationHour" name="durationHour" value="${fieldValue(bean:entryInstance,field:'durationHour')}" /> |
---|
63 | </td> |
---|
64 | </tr> |
---|
65 | |
---|
66 | <tr class="prop"> |
---|
67 | <td valign="top" class="name"> |
---|
68 | <label for="durationMinute">Duration Minute:</label> |
---|
69 | </td> |
---|
70 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}"> |
---|
71 | <input type="text" id="durationMinute" name="durationMinute" value="${fieldValue(bean:entryInstance,field:'durationMinute')}" /> |
---|
72 | </td> |
---|
73 | </tr> |
---|
74 | |
---|
75 | |
---|
76 | <tr class="prop"> |
---|
77 | <td valign="top" class="name"> |
---|
78 | <label for="entryType">Entry Type:</label> |
---|
79 | </td> |
---|
80 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'entryType','errors')}"> |
---|
81 | <g:select optionKey="id" from="${EntryType.list()}" name="entryType.id" value="${entryInstance?.entryType?.id}" ></g:select> |
---|
82 | </td> |
---|
83 | </tr> |
---|
84 | |
---|
85 | </tbody> |
---|
86 | </table> |
---|
87 | </div> |
---|
88 | <div class="buttons"> |
---|
89 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
90 | </div> |
---|
91 | </g:form> |
---|
92 | </div> |
---|
93 | </body> |
---|
94 | </html> |
---|