source: WAeUP_SRP/trunk/skins/waeup_layout/layout_clearance_edit.pt @ 4006

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

further modifications for session change

File size: 3.0 KB
Line 
1<!-- a layout_lib macro -->
2<!-- $Id: layout_clearance_edit.pt 1836 2007-05-30 10:41:15Z henrik $ -->
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:clearance_edit;
9  creation creation|nothing;
10  metadata metadata|nothing;
11  type_name request/type_name|nothing;
12  cpsmcat nocall:here/translation_service;
13  proceed options/proceed|nothing;
14  widgets python:context.getRenderedWidgets(layout);
15  ">
16  <table class="layoutDefault" summary="Form layout"
17         tal:condition="layout/rows">
18    <span tal:repeat="row python: layout['rows']" valign="top" >
19      <span tal:repeat="cell row">
20        <span tal:define="widget cell/widget;
21              wid widget/getWidgetId;
22              err python:ds.getError(wid);
23              err_mapping python:ds.getErrorMapping(wid);
24              is_required python: widget.is_required;
25              tooltip_id python:wid + '_help';
26              widget_css_class cell/widget_css_class|nothing;
27              css_class python:test(err, 'row error','row')"
28              tal:condition="python: wid != 'passport'"
29              >
30        <tr tal:condition="widget/description|nothing" class="even ajaxtd">
31          <th colspan="5" align="left"><h3 tal:replace="widget/description" /></th>
32        </tr>
33        <tr>
34          <div tal:attributes="class widget_css_class;
35          id python:widget.getHtmlWidgetId()+'_widget';"
36          >
37            <td>
38            <div class="label" tal:condition="widget/label_edit"
39                 tal:attributes="class python:test(is_required, 'label required','label')">
40              <label tal:content="widget/label_edit"
41                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
42           
43            <button type="button" class="tooltipControl"
44                    tal:condition="widget/help"
45                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
46            </div>       
47            </td>
48            <td valign="bottom">
49            <span class="field">
50              <div tal:replace="structure cell/widget_rendered"/>
51            </span>
52            <div class="tooltipArea" style="visibility: hidden;"
53                 tal:condition="widget/help"
54                 tal:attributes="id tooltip_id;
55                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
56                 >
57              <tal:block tal:content="widget/help">This is the help for this field
58              </tal:block>
59            </div>
60            <tal:block condition="python:err">
61              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
62                <br /><em style="color: red"
63                          tal:content="msg">err</em>
64              </tal:block>
65            </tal:block>
66            </td>
67          </div>
68        </tr>
69      </span>
70      </span>
71    </span>
72  </table>
73</metal:block>
Note: See TracBrowser for help on using the repository browser.