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