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 | <g:set var="entityName" value="${message(code: 'event.label', default: 'Event')}" /> |
---|
8 | <title><g:message code="default.create.label" args="[entityName]" /></title> |
---|
9 | <g:render template="../common/jquerysetup"/> |
---|
10 | <g:render template="../common/jqueryuisetup"/> |
---|
11 | <g:render template="../common/jquerytmsetup"/> |
---|
12 | </head> |
---|
13 | |
---|
14 | |
---|
15 | |
---|
16 | <body> |
---|
17 | |
---|
18 | <div class="nav"> |
---|
19 | <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Home</a></span> |
---|
20 | <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span> |
---|
21 | </div> |
---|
22 | |
---|
23 | |
---|
24 | <div class="body"> |
---|
25 | |
---|
26 | <h1><g:message code="default.create.label" args="[entityName]" /></h1> |
---|
27 | |
---|
28 | <g:if test="${flash.message}"> |
---|
29 | <div class="message">${flash.message}</div> |
---|
30 | </g:if> |
---|
31 | <g:hasErrors bean="${eventInstance}"> |
---|
32 | <div class="errors"> <g:renderErrors bean="${eventInstance}" as="list" /> </div> |
---|
33 | </g:hasErrors> |
---|
34 | |
---|
35 | |
---|
36 | |
---|
37 | <g:form action="save" method="post" > |
---|
38 | |
---|
39 | <div class="dialog"> |
---|
40 | <table> |
---|
41 | <tbody> |
---|
42 | |
---|
43 | |
---|
44 | <tr class="prop"> |
---|
45 | <td valign="top" class="name"> |
---|
46 | <label for="subject"><g:message code="event.subject.label" default="Subject" /></label> |
---|
47 | </td> |
---|
48 | <td valign="top" class="value" > |
---|
49 | <g:select id="subject" name="subject.id" from="${dbnp.studycapturing.Subject.list()}" optionKey="id" optionValue="name" value="${eventInstance?.subject?.id}" onchange="displayVals()" /> |
---|
50 | </td> |
---|
51 | </tr> |
---|
52 | |
---|
53 | <tr class="prop"> |
---|
54 | <td valign="top" class="name"> |
---|
55 | <label for="startTime"><g:message code="event.startTime" default="Start Time" /></label> |
---|
56 | </td> |
---|
57 | <td valign="top" class="name"> |
---|
58 | <script> $(function() { $('#startTime').datepicker({ duration: '', showTime: true, constrainInput: false });}); </script> |
---|
59 | <% def displayStartTime =String.format("%tm/", sDate ) %> |
---|
60 | <% displayStartTime+=String.format("%td/", sDate ) %> |
---|
61 | <% displayStartTime+=String.format("%tY", sDate ) %> |
---|
62 | <% displayStartTime+=String.format(" %tI:", sDate ) %> |
---|
63 | <% displayStartTime+=String.format("%tM ", sDate ) %> |
---|
64 | <% displayStartTime+=String.format("%tp", sDate ) %> |
---|
65 | <g:textField name="startTime" value="${displayStartTime}" /> |
---|
66 | </td> |
---|
67 | </tr> |
---|
68 | |
---|
69 | |
---|
70 | |
---|
71 | <tr class="prop"> |
---|
72 | <td valign="top" class="name"> |
---|
73 | <label for="endTime"><g:message code="event.endTime.label" default="End Time" /></label> |
---|
74 | </td> |
---|
75 | <td valign="top" class="name"> |
---|
76 | <script> $(function() { $('#endTime').datepicker({ duration: '', showTime: true, constrainInput: false });}); </script> |
---|
77 | <% def displayEndTime =String.format("%tm/", eDate ) %> |
---|
78 | <% displayEndTime+=String.format("%td/", eDate ) %> |
---|
79 | <% displayEndTime+=String.format("%tY", eDate ) %> |
---|
80 | <% displayEndTime+=String.format(" %tI:", eDate ) %> |
---|
81 | <% displayEndTime+=String.format("%tM ", eDate ) %> |
---|
82 | <% displayEndTime+=String.format("%tp", eDate ) %> |
---|
83 | <g:textField name="endTime" value="${displayEndTime}" /> |
---|
84 | </td> |
---|
85 | </tr> |
---|
86 | |
---|
87 | |
---|
88 | |
---|
89 | <g:render template="../common/eventDescriptionTableRows" model="${[description:description]}"/> |
---|
90 | |
---|
91 | |
---|
92 | </tbody> |
---|
93 | </table> |
---|
94 | </div> |
---|
95 | |
---|
96 | |
---|
97 | <div class="buttons"> |
---|
98 | <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span> |
---|
99 | </div> |
---|
100 | |
---|
101 | |
---|
102 | </g:form> |
---|
103 | </div> |
---|
104 | </body> |
---|
105 | </html> |
---|