source: WAeUP_SRP/trunk/skins/waeup_student/layout_personal_edit.pt @ 1684

Last change on this file since 1684 was 1167, checked in by Henrik Bettermann, 18 years ago

new personal templates and scripts
student workflow extended

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