source: WAeUP_SRP/trunk/skins/waeup_student/layout_application_edit.pt @ 1620

Last change on this file since 1620 was 1071, checked in by joachim, 18 years ago

speed improvements for waeup_edit and portlet_session_info

  • Property svn:keywords set to Id
File size: 4.6 KB
RevLine 
[478]1<!-- a layout_lib macro -->
[486]2<!-- $Id: layout_application_edit.pt 1071 2006-12-16 15:53:13Z joachim $ -->
[492]3
[478]4<metal:block define-macro="default_edit"
5  tal:define="layout options/layout;
[486]6  ds options/datastructure;
7  dm ds/getDataModel;
[788]8  formaction options/formaction|string:application_edit;
[486]9  creation creation|nothing;
10  cpsmcat nocall:here/translation_service;
[788]11  proceed options/proceed|nothing;
[537]12  widgets python:context.getRenderedWidgets(layout);
[486]13  ">
[537]14  <table class="layoutDefault" summary="Form layout"
[486]15         tal:condition="layout/rows">
[537]16    <span tal:repeat="row python: layout['rows']" valign="top" >
17      <span tal:repeat="cell row">
18        <tr tal:define="widget cell/widget;
[492]19              wid widget/getWidgetId;
20              err python:ds.getError(wid);
21              err_mapping python:ds.getErrorMapping(wid);
[710]22              is_required python: widget.is_required;
[492]23              tooltip_id python:wid + '_help';
24              widget_css_class cell/widget_css_class|nothing;
25              css_class python:test(err, 'row error','row')"
[537]26              tal:condition="python: wid != 'passport'"
[492]27              >
[486]28          <div tal:attributes="class widget_css_class;
29          id python:widget.getHtmlWidgetId()+'_widget';"
30          >
[492]31            <td>
[486]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"
[492]35                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
[486]36            </div>
37            <button type="button" class="tooltipControl"
38                    tal:condition="widget/help"
39                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
[492]40            </td>
41            <td>
42            <span class="field">
[486]43              <div tal:replace="structure cell/widget_rendered"/>
[492]44            </span>
[486]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">
[478]54              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
55                <br /><em style="color: red"
[486]56                          tal:content="msg">err</em>
[478]57              </tal:block>
[486]58            </tal:block>
[492]59            </td>
[478]60          </div>
[537]61        </tr>
62      </span>
63    </span>
[672]64    <tr tal:condition="widgets/passport|nothing"
65        tal:define="cell widgets/passport|nothing;">
[537]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>
[478]111</metal:block>
Note: See TracBrowser for help on using the repository browser.