1 | <tal:block define="global creation python:1;
|
---|
2 | global formaction string:apply_admission;
|
---|
3 | global fields python:('reg_no ',
|
---|
4 | 'pin','firstname',
|
---|
5 | 'middlenames','lastname',
|
---|
6 | 'passport','screening_venue',
|
---|
7 | 'application_date','course_admitted',
|
---|
8 | 'screening_score','notice',
|
---|
9 | 'screening_date','status',
|
---|
10 | 'screening_date',
|
---|
11 | )" />
|
---|
12 |
|
---|
13 | <metal:block define-macro="default_table"
|
---|
14 | tal:define="layout options/layout;
|
---|
15 | ds options/datastructure;
|
---|
16 | dm ds/getDataModel;
|
---|
17 | creation creation|nothing;
|
---|
18 | metadata metadata|nothing;
|
---|
19 | cpsmcat nocall:here/translation_service;
|
---|
20 | apply request/apply_button|nothing;">
|
---|
21 |
|
---|
22 | <table cellpadding="2" cellspacing="2" summary="Form layout" border=0
|
---|
23 | tal:condition="layout/rows">
|
---|
24 |
|
---|
25 | <tal:block repeat="row layout/rows">
|
---|
26 | <tal:block define="widget python:row[0]['widget']" condition="python:widget.getWidgetId() in fields">
|
---|
27 |
|
---|
28 | <tr tal:condition="widget/description|nothing" class="even ajaxtd">
|
---|
29 | <th colspan="5" align="left"><span tal:replace="widget/description" /></th>
|
---|
30 | </tr>
|
---|
31 |
|
---|
32 | <tr valign="top">
|
---|
33 | <span tal:repeat="cell row">
|
---|
34 | <tal:block define="widget cell/widget;
|
---|
35 | wid widget/getWidgetId;
|
---|
36 | err python:ds.getError(wid);
|
---|
37 | err_mapping python:ds.getErrorMapping(wid);
|
---|
38 | widget_css_class cell/widget_css_class|nothing;
|
---|
39 | css_class python:test(err, 'row error','row')">
|
---|
40 | <span tal:attributes="class widget_css_class;
|
---|
41 | id python:widget.getHtmlWidgetId()+'_widget';
|
---|
42 | ">
|
---|
43 | <td valign="middle" tal:condition="python:widget.label_edit and widget.label_edit!='label field'">
|
---|
44 | <div class="label">
|
---|
45 | <label tal:content="widget/label_edit"
|
---|
46 | tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
|
---|
47 | </div>
|
---|
48 | </td>
|
---|
49 |
|
---|
50 | <td tal:condition="cell/widget_rendered">
|
---|
51 | <div tal:attributes="class python:test(widget.label_edit == 'label field', 'label','')">
|
---|
52 | <label tal:replace="structure cell/widget_rendered"/>
|
---|
53 | </div>
|
---|
54 | <tal:block condition="err">
|
---|
55 | <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
|
---|
56 | <em style="color: red"
|
---|
57 | tal:content="msg">err</em>
|
---|
58 | </tal:block>
|
---|
59 | </tal:block>
|
---|
60 | </td>
|
---|
61 |
|
---|
62 | </span>
|
---|
63 | </tal:block>
|
---|
64 | </span>
|
---|
65 | </tr>
|
---|
66 |
|
---|
67 | </tal:block>
|
---|
68 | </tal:block>
|
---|
69 | </table>
|
---|
70 | <br/>
|
---|
71 | </metal:block>
|
---|