source: WAeUP_SRP/trunk/skins/waeup_student/layout_clearance_edit.pt @ 979

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

layouts beautified
cpsdocument_edit_form.pt should not be used for clearance objects, has to be changed

  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1<!-- a layout_lib macro -->
2<!-- $Id: layout_clearance_edit.pt 842 2006-11-11 13:51:20Z 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 valign="top">
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            </div>
43            <button type="button" class="tooltipControl"
44                    tal:condition="widget/help"
45                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
46            </td>
47            <td valign="top">
48            <span class="field">
49              <div tal:replace="structure cell/widget_rendered"/>
50            </span>
51            <div class="tooltipArea" style="visibility: hidden;"
52                 tal:condition="widget/help"
53                 tal:attributes="id tooltip_id;
54                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
55                 >
56              <tal:block tal:content="widget/help">This is the help for this field
57              </tal:block>
58            </div>
59            <tal:block condition="python:err">
60              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
61                <br /><em style="color: red"
62                          tal:content="msg">err</em>
63              </tal:block>
64            </tal:block>
65            </td>
66          </div>
67        </tr>
68      </span>
69      </span>
70    </span>
71  </table>
72</metal:block>
Note: See TracBrowser for help on using the repository browser.