source: WAeUP_SRP/trunk/skins/waeup_layout/layout_plain_edit.pt @ 8145

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

skins reorganized

File size: 4.6 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       
15    <span tal:repeat="row python: layout['rows']" valign="top" >
16      <span tal:repeat="cell row">
17        <tr tal:define="widget cell/widget;
18              wid widget/getWidgetId;
19              err python:ds.getError(wid);
20              err_mapping python:ds.getErrorMapping(wid);
21              is_required python: widget.is_required;
22              tooltip_id python:wid + '_help';
23              widget_css_class cell/widget_css_class|nothing;
24              css_class python:test(err, 'row error','row')"
25              tal:condition="python: wid != 'passport'"
26              >
27          <div tal:attributes="class widget_css_class;
28          id python:widget.getHtmlWidgetId()+'_widget';"
29          >
30            <td>
31            <div class="label" tal:condition="widget/label_edit"
32                 tal:attributes="class python:test(is_required, 'label required','label')">
33              <label tal:content="widget/label_edit"
34                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
35            </div>
36            <button type="button" class="tooltipControl"
37                    tal:condition="widget/help"
38                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
39            </td>
40            <td>
41            <span class="field">
42              <div tal:replace="structure cell/widget_rendered"/>
43            </span>
44            <div class="tooltipArea" style="visibility: hidden;"
45                 tal:condition="widget/help"
46                 tal:attributes="id tooltip_id;
47                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
48                 >
49              <tal:block tal:content="widget/help">This is the help for this field
50              </tal:block>
51            </div>
52            <tal:block condition="err">
53              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
54                <br /><em style="color: red"
55                          tal:content="msg">err</em>
56              </tal:block>
57            </tal:block>
58            </td>
59          </div>
60        </tr>
61      </span>
62    </span>
63    <tr tal:condition="widgets/passport|nothing"
64        tal:define="cell widgets/passport|nothing;">
65      <tal:block tal:define="widget cell/widget;
66      wid widget/getWidgetId;
67      err python:ds.getError(wid);
68      err_mapping python:ds.getErrorMapping(wid);
69      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
70      tooltip_id python:wid + '_help';
71      widget_css_class widget/widget_css_class|nothing;
72      css_class python:test(err, 'row error','row')"
73      >
74        <div tal:attributes="class widget_css_class;
75        id python:widget.getHtmlWidgetId()+'_widget';"
76        >
77          <td>
78            <div class="label" tal:condition="widget/label_edit"
79                 tal:attributes="class python:test(is_required, 'label required','label')">
80              <label tal:content="widget/label_edit"
81                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
82            </div>
83            <button type="button" class="tooltipControl"
84                    tal:condition="widget/help"
85                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
86          </td>
87          <td>
88            <span class="field">
89              <div tal:replace="structure cell/widget_rendered"/>
90            </span>
91            <div class="tooltipArea" style="visibility: hidden;"
92                 tal:condition="widget/help"
93                 tal:attributes="id tooltip_id;
94                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
95                 >
96              <tal:block tal:content="widget/help">This is the help for this field
97              </tal:block>
98            </div>
99            <tal:block condition="err">
100              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
101                <br /><em style="color: red"
102                          tal:content="msg">err</em>
103              </tal:block>
104            </tal:block>
105          </td>
106        </div>
107      </tal:block>
108    </tr>
109  </table>
110</metal:block>
Note: See TracBrowser for help on using the repository browser.