1 | <tal:block define="global creation python:1" /> |
---|
2 | <metal:block define-macro="default_edit" |
---|
3 | tal:define="layout options/layout; |
---|
4 | ds options/datastructure; |
---|
5 | creation creation|nothing; |
---|
6 | metadata metadata|nothing; |
---|
7 | type_name request/type_name|nothing; |
---|
8 | ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None); |
---|
9 | creation_form python:ti and ti.getActionById('create', 'cpsdocument_create_form') or 'cpsdocument_create_form' ; |
---|
10 | edit_form python:ti and ti.getActionById('edit', 'cpsdocument_edit_form') or 'cpsdocument_edit_form'; |
---|
11 | metadata_form python:ti and ti.getActionById('metadata', 'cpsdocument_metadata') or 'cpsdocument_metadata'; |
---|
12 | formaction options/formaction; |
---|
13 | first_layout options/first_layout|python:0; |
---|
14 | last_layout options/last_layout|python:0; |
---|
15 | is_flexible options/is_flexible; |
---|
16 | cpsmcat nocall:here/translation_service; |
---|
17 | results options/schoolresults; |
---|
18 | " |
---|
19 | > |
---|
20 | <form action='eligibility' method='post' tal:attributes="action formaction" |
---|
21 | enctype='multipart/form-data' class='workflow'> |
---|
22 | <div class=''> |
---|
23 | <div class='documentFields'> |
---|
24 | <table width="100%" cellpadding="2" cellspacing="2" summary="Form layout"> |
---|
25 | <tr tal:repeat="row layout/rows" valign="top"> |
---|
26 | <td tal:repeat="cell row" |
---|
27 | tal:attributes="colspan cell/ncols"> |
---|
28 | <tal:block define="widget cell/widget; |
---|
29 | wid widget/getWidgetId; |
---|
30 | dm options/datastructure/getDataModel; |
---|
31 | err python:ds.getError(wid); |
---|
32 | err_mapping python:ds.getErrorMapping(wid); |
---|
33 | is_required widget/is_required|nothing; |
---|
34 | tooltip_id python:wid + '_help'; |
---|
35 | widget_css_class cell/widget_css_class|nothing; |
---|
36 | widget_css_class python:test(is_flexible, 'group', widget_css_class); |
---|
37 | css_class python:test(err, 'row error', |
---|
38 | test(is_flexible, 'group', 'row'))" |
---|
39 | > |
---|
40 | <div tal:attributes="class widget_css_class; |
---|
41 | id python:widget.getHtmlWidgetId()+'_widget';" |
---|
42 | > |
---|
43 | <div class="label" tal:condition="widget/label_edit" |
---|
44 | tal:attributes="class python:test(is_required, 'label required','label')"> |
---|
45 | <label i18n:translate="" tal:condition="widget/is_i18n" |
---|
46 | tal:content="widget/label_edit" |
---|
47 | tal:attributes="for cell/widget_input_area_id|nothing;">label</label> |
---|
48 | <label tal:condition="not:widget/is_i18n" |
---|
49 | tal:content="widget/label_edit" |
---|
50 | tal:attributes="for cell/widget_input_area_id|nothing;">label</label> |
---|
51 | </div> |
---|
52 | <button type="button" class="tooltipControl" |
---|
53 | tal:condition="widget/help" |
---|
54 | tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button> |
---|
55 | <div class="field"> |
---|
56 | <div tal:replace="structure cell/widget_rendered"/> |
---|
57 | </div> |
---|
58 | <div class="tooltipArea" style="visibility: hidden;" |
---|
59 | tal:condition="widget/help" |
---|
60 | tal:attributes="id tooltip_id; |
---|
61 | onclick python:'showElement(false, \'%s\')' % tooltip_id;" |
---|
62 | > |
---|
63 | <tal:block i18n:translate="" tal:condition="widget/is_i18n" |
---|
64 | tal:content="widget/help">i18_key-help_for_this_field</tal:block> |
---|
65 | <tal:block tal:condition="not:widget/is_i18n" |
---|
66 | tal:content="widget/help">This is the help for this field</tal:block> |
---|
67 | </div> |
---|
68 | <tal:block condition="err"> |
---|
69 | <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)"> |
---|
70 | <br /><em style="color: red" |
---|
71 | tal:content="msg">err</em> |
---|
72 | </tal:block> |
---|
73 | </tal:block> |
---|
74 | </div> |
---|
75 | </tal:block> |
---|
76 | </td> |
---|
77 | </tr> |
---|
78 | </table> |
---|
79 | <table cellspacing="0" cellpadding="2" border="0" width="100%" tal:condition="results|nothing"> |
---|
80 | <tr> |
---|
81 | <td align="left" valign="top"> |
---|
82 | |
---|
83 | </td> |
---|
84 | <td align="left" valign="top"> |
---|
85 | <div class="label">Type</div> |
---|
86 | </td> |
---|
87 | <td align="left" valign="top"> |
---|
88 | <div class="label">Subject</div> |
---|
89 | </td> |
---|
90 | <td align="left" valign="top"> |
---|
91 | <div class="label">Result</div> |
---|
92 | </td> |
---|
93 | </tr> |
---|
94 | <span tal:repeat="row results" tal:omit-tag=""> |
---|
95 | <tr tal:define="rindex repeat/row/index"> |
---|
96 | <td align="left" valign="top"> |
---|
97 | <input type="checkbox" name="keys:list" value="100" tal:attributes="value string:${repeat/row/index}"/> |
---|
98 | </td> |
---|
99 | <td align="left" valign="top"> |
---|
100 | <div class="field"> |
---|
101 | <input type="text" name="key_0" value="100" size="20" |
---|
102 | tal:attributes="name string:type_${rindex};value python:row[0]" /> |
---|
103 | </div> |
---|
104 | </td> |
---|
105 | <td align="left"> |
---|
106 | <div class="field"> |
---|
107 | <input type="text" name="label_0" value="Year 1 (100 Level)" size="40" |
---|
108 | tal:attributes="name string:subject_${rindex};value python:row[1]" /> |
---|
109 | </div> |
---|
110 | </td> |
---|
111 | <td align="left"> |
---|
112 | <div class="field"> |
---|
113 | <input type="text" name="msgid_0" value="" size="10" |
---|
114 | tal:attributes="name string:result_${rindex};value python:row[2]" /> |
---|
115 | </div> |
---|
116 | </td> |
---|
117 | </tr> |
---|
118 | </span> |
---|
119 | <tr> |
---|
120 | <td align="left" colspan="3"> |
---|
121 | <input class="standalone" type="submit" name="change" value=" Change " /> |
---|
122 | <input class="standalone" type="submit" name="delete" value=" Delete " /> |
---|
123 | </td> |
---|
124 | </tr> |
---|
125 | </table> |
---|
126 | <table cellspacing="0" cellpadding="2" border="0" width="100%"> |
---|
127 | <tr> |
---|
128 | <td align="left" valign="top" colspan="2"> |
---|
129 | <div>Add a new post-primary school result:</div> |
---|
130 | </td> |
---|
131 | </tr> |
---|
132 | <tr> |
---|
133 | <td align="left" valign="top"> |
---|
134 | |
---|
135 | </td> |
---|
136 | <td align="left" valign="top"> |
---|
137 | <div class="label">Type</div> |
---|
138 | </td> |
---|
139 | <td align="left" valign="top"> |
---|
140 | <div class="label">Subject</div> |
---|
141 | </td> |
---|
142 | <td align="left" valign="top"> |
---|
143 | <div class="label">Result</div> |
---|
144 | </td> |
---|
145 | </tr> |
---|
146 | <tr> |
---|
147 | <td align="left" valign="top"> |
---|
148 | |
---|
149 | </td> |
---|
150 | <td align="left" valign="top"> |
---|
151 | <div class="field"> |
---|
152 | <input type="text" name="type" value="" size="20" /> |
---|
153 | </div> |
---|
154 | </td> |
---|
155 | <td align="left"> |
---|
156 | <div class="field"> |
---|
157 | <input type="text" name="subject" value="" size="40" /> |
---|
158 | </div> |
---|
159 | </td> |
---|
160 | <td align="left"> |
---|
161 | <div class="field"> |
---|
162 | <input type="text" name="result" value="" size="10" /> |
---|
163 | </div> |
---|
164 | </td> |
---|
165 | </tr> |
---|
166 | <tr> |
---|
167 | <td align="left" colspan="3"> |
---|
168 | <input class="standalone" type="submit" name="add" value=" Change/Add " /> |
---|
169 | </td> |
---|
170 | </tr> |
---|
171 | </table> |
---|
172 | </form> |
---|
173 | </metal:block> |
---|
174 | |
---|