1 | <html> |
---|
2 | <head> |
---|
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
4 | <meta name="layout" content="main"/> |
---|
5 | <title>Simple study wizard</title> |
---|
6 | |
---|
7 | <g:render template="javascripts" /> |
---|
8 | </head> |
---|
9 | <body> |
---|
10 | <div class="simpleWizard"> |
---|
11 | <h1>Edit properties</h1> |
---|
12 | |
---|
13 | <g:if test="${error}"> |
---|
14 | <div class="errormessage"> |
---|
15 | ${error.toString().encodeAsHTML()} |
---|
16 | </div> |
---|
17 | </g:if> |
---|
18 | <g:if test="${message}"> |
---|
19 | <div class="message"> |
---|
20 | ${message.toString().encodeAsHTML()} |
---|
21 | </div> |
---|
22 | </g:if> |
---|
23 | |
---|
24 | <g:form class="simpleWizard" name="missingFields" action="simpleWizard"> |
---|
25 | <input type="hidden" name="_eventId" value="refresh" /> |
---|
26 | |
---|
27 | <span class="info"> |
---|
28 | <span class="title">Fill in missing properties</span> |
---|
29 | <g:if test="${imported.numInvalidEntities > 0}"> |
---|
30 | A number of records could not be succesfully imported. Fields giving an error are indicated by a red color. Please correct them before continuing. |
---|
31 | </g:if> |
---|
32 | <g:else> |
---|
33 | The imported data is shown below. You can edit the data before continuing. |
---|
34 | </g:else> |
---|
35 | |
---|
36 | <g:if test="${imported.errors}"> |
---|
37 | <br /><br />The following errors occurred:<br /> |
---|
38 | <g:each in="${imported.errors.unique()}" var="err"> |
---|
39 | ${err}<br /> |
---|
40 | </g:each> |
---|
41 | </g:if> |
---|
42 | </span> |
---|
43 | |
---|
44 | <script type="text/javascript"> |
---|
45 | $(document).ready(function() { |
---|
46 | // mark error fields |
---|
47 | <g:each in="${imported.failedCells}" var="record"> |
---|
48 | <g:each in="${record.importcells}" var="cell"> |
---|
49 | markFailedField( "${cell.entityidentifier.toString().encodeAsJavaScript()}", "${cell.value.toString().encodeAsJavaScript()}" ); |
---|
50 | </g:each> |
---|
51 | </g:each> |
---|
52 | }); |
---|
53 | </script> |
---|
54 | |
---|
55 | <div class="wizard" id="wizard"> |
---|
56 | <g:set var="showHeader" value="${true}" /> |
---|
57 | <g:set var="previousTemplate" value=""/> |
---|
58 | <div class="tableEditor"> |
---|
59 | <g:each var="record" in="${imported.data}"> |
---|
60 | <g:if test="${showHeader}"> |
---|
61 | <g:set var="showHeader" value="${false}" /> |
---|
62 | <div class="header"> |
---|
63 | <div class="firstColumn"></div> |
---|
64 | <g:each var="entity" in="${record}"> |
---|
65 | <g:if test="${entity}"> |
---|
66 | <af:templateColumnHeaders includeEntities="${true}" entity="${entity}" class="column" columnWidths="[Name:100]"/> |
---|
67 | </g:if> |
---|
68 | </g:each> |
---|
69 | </div> |
---|
70 | </g:if> |
---|
71 | <div class="row"> |
---|
72 | <div class="firstColumn"></div> |
---|
73 | <g:each var="entity" in="${record}"> |
---|
74 | <g:set var="entityName" value="${entity?.class?.name ? entity.class.name[ entity.class.name.lastIndexOf( '.' ) + 1 .. -1 ] : 'unknown'}" /> |
---|
75 | <g:if test="${entity}"> |
---|
76 | <af:templateColumns id="${entity.hashCode()}" name="${entityName.toLowerCase()}_${entity.getIdentifier()}" template="${entity.template}" class="column" id="1" entity="${entity}" addDummy="true" subject="${entity.hashCode()}" /> |
---|
77 | </g:if> |
---|
78 | </g:each> |
---|
79 | </div> |
---|
80 | </g:each> |
---|
81 | </div> |
---|
82 | <div class="sliderContainer"> |
---|
83 | <div class="slider" ></div> |
---|
84 | </div> |
---|
85 | <div> |
---|
86 | </g:form> |
---|
87 | |
---|
88 | <p class="options"> |
---|
89 | <a href="#" onClick="submitForm( 'missingFields', 'previous' ); return false;" class="previous">Previous</a> |
---|
90 | <a href="#" onClick="submitForm( 'missingFields', 'next' ); return false;" class="next">Next</a> |
---|
91 | </p> |
---|
92 | </div> |
---|
93 | </body> |
---|
94 | </html> |
---|