source: WAeUP_SRP/base/skins/waeup_layout/layout_personal_edit.pt @ 2496

Last change on this file since 2496 was 2243, checked in by Henrik Bettermann, 17 years ago

skins reorganized

File size: 5.0 KB
Line 
1<metal:block define-macro="default_edit"
2  tal:define="layout options/layout;
3  ds options/datastructure;
4  dm ds/getDataModel;
5  formaction options/formaction|string:personal_edit;
6  creation creation|nothing;
7  cpsmcat nocall:here/translation_service;
8  proceed options/proceed|nothing;
9  widgets python:context.getRenderedWidgets(layout);
10  ">
11  <table class="layoutDefault" summary="Form layout"
12         tal:condition="layout/rows">
13         
14    <tr tal:define="lga python:context.getStudentBaseInfo()['student']['lga'];
15                    lga_voc python:context.portal_vocabularies.local_gov_areas.get(lga)">
16      <td><div class="label">State / LGA</div>:
17      </td>
18      <td tal:condition="lga_voc">
19         <span tal:replace="lga_voc" />
20      </td>     
21      <td tal:condition="not: lga_voc">
22         <span tal:replace="lga" />
23      </td>           
24    </tr>   
25         
26    <span tal:repeat="row python: layout['rows']" valign="top" >
27      <span tal:repeat="cell row">
28        <tr tal:define="widget cell/widget;
29              wid widget/getWidgetId;
30              err python:ds.getError(wid);
31              err_mapping python:ds.getErrorMapping(wid);
32              is_required python: widget.is_required;
33              tooltip_id python:wid + '_help';
34              widget_css_class cell/widget_css_class|nothing;
35              css_class python:test(err, 'row error','row')"
36              tal:condition="python: wid != 'passport'"
37              >
38          <div tal:attributes="class widget_css_class;
39          id python:widget.getHtmlWidgetId()+'_widget';"
40          >
41            <td>
42            <div class="label" tal:condition="widget/label_edit"
43                 tal:attributes="class python:test(is_required, 'label required','label')">
44              <label tal:content="widget/label_edit"
45                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
46            </div>
47            <button type="button" class="tooltipControl"
48                    tal:condition="widget/help"
49                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
50            </td>
51            <td>
52            <span class="field">
53              <div tal:replace="structure cell/widget_rendered"/>
54            </span>
55            <div class="tooltipArea" style="visibility: hidden;"
56                 tal:condition="widget/help"
57                 tal:attributes="id tooltip_id;
58                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
59                 >
60              <tal:block tal:content="widget/help">This is the help for this field
61              </tal:block>
62            </div>
63            <tal:block condition="err">
64              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
65                <br /><em style="color: red"
66                          tal:content="msg">err</em>
67              </tal:block>
68            </tal:block>
69            </td>
70          </div>
71        </tr>
72      </span>
73    </span>
74    <tr tal:condition="widgets/passport|nothing"
75        tal:define="cell widgets/passport|nothing;">
76      <tal:block tal:define="widget cell/widget;
77      wid widget/getWidgetId;
78      err python:ds.getError(wid);
79      err_mapping python:ds.getErrorMapping(wid);
80      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
81      tooltip_id python:wid + '_help';
82      widget_css_class widget/widget_css_class|nothing;
83      css_class python:test(err, 'row error','row')"
84      >
85        <div tal:attributes="class widget_css_class;
86        id python:widget.getHtmlWidgetId()+'_widget';"
87        >
88          <td>
89            <div class="label" tal:condition="widget/label_edit"
90                 tal:attributes="class python:test(is_required, 'label required','label')">
91              <label tal:content="widget/label_edit"
92                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
93            </div>
94            <button type="button" class="tooltipControl"
95                    tal:condition="widget/help"
96                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
97          </td>
98          <td>
99            <span class="field">
100              <div tal:replace="structure cell/widget_rendered"/>
101            </span>
102            <div class="tooltipArea" style="visibility: hidden;"
103                 tal:condition="widget/help"
104                 tal:attributes="id tooltip_id;
105                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
106                 >
107              <tal:block tal:content="widget/help">This is the help for this field
108              </tal:block>
109            </div>
110            <tal:block condition="err">
111              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
112                <br /><em style="color: red"
113                          tal:content="msg">err</em>
114              </tal:block>
115            </tal:block>
116          </td>
117        </div>
118      </tal:block>
119    </tr>
120  </table>
121</metal:block>
Note: See TracBrowser for help on using the repository browser.