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