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

Last change on this file since 839 was 803, checked in by joachim, 18 years ago

application_edit etc. like clearance_edit

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