source: WAeUP_SRP/trunk/skins/waeup_layout/layout_student_acco_create.pt @ 4671

Last change on this file since 4671 was 2857, checked in by joachim, 17 years ago
File size: 5.2 KB
Line 
1<tal:block define="global creation python:1" />
2<!-- a layout_lib macro -->
3<!-- $Id: layout_student_acco_create.pt 805 2006-11-09 09:38:29Z joachim $ -->
4
5<metal:block define-macro="default_edit"
6  tal:define="layout options/layout;
7  ds options/datastructure;
8  dm ds/getDataModel;
9  formaction options/formaction;
10  creation creation|nothing;
11  metadata metadata|nothing;
12  type_name request/type_name|nothing;
13  ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
14  cpsmcat nocall:here/translation_service;
15  widgets python:context.getRenderedWidgets(layout);
16  ">
17  <form action="" id="editForm" method="post"
18        enctype="multipart/form-data" class="workflow"
19        tal:attributes="action formaction"
20        >
21  <table class="layoutDefault" summary="Form layout"
22         tal:condition="layout/rows">
23    <span tal:repeat="row python: layout['rows']" valign="top" >
24      <span tal:repeat="cell row">
25        <tr tal:define="widget cell/widget;
26              wid widget/getWidgetId;
27              err python:ds.getError(wid);
28              err_mapping python:ds.getErrorMapping(wid);
29              is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
30              tooltip_id python:wid + '_help';
31              widget_css_class cell/widget_css_class|nothing;
32              css_class python:test(err, 'row error','row')"
33              tal:condition="python: wid != 'passport'"
34              >
35          <div tal:attributes="class widget_css_class;
36          id python:widget.getHtmlWidgetId()+'_widget';"
37          >
38            <td>
39            <div class="label" tal:condition="widget/label_edit"
40                 tal:attributes="class python:test(is_required, 'label required','label')">
41              <label tal:content="widget/label_edit"
42                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
43            </div>
44            <button type="button" class="tooltipControl"
45                    tal:condition="widget/help"
46                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
47            </td>
48            <td>
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="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    <tr tal:condition="widgets/passport|nothing"
72        tal:define="cell widgets/passport|nothing;">
73      <tal:block tal:define="widget cell/widget;
74      wid widget/getWidgetId;
75      err python:ds.getError(wid);
76      err_mapping python:ds.getErrorMapping(wid);
77      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
78      tooltip_id python:wid + '_help';
79      widget_css_class widget/widget_css_class|nothing;
80      css_class python:test(err, 'row error','row')"
81      >
82        <div tal:attributes="class widget_css_class;
83        id python:widget.getHtmlWidgetId()+'_widget';"
84        >
85          <td>
86            <div class="label" tal:condition="widget/label_edit"
87                 tal:attributes="class python:test(is_required, 'label required','label')">
88              <label tal:content="widget/label_edit"
89                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
90            </div>
91            <button type="button" class="tooltipControl"
92                    tal:condition="widget/help"
93                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
94          </td>
95          <td>
96            <span class="field">
97              <div tal:replace="structure cell/widget_rendered"/>
98            </span>
99            <div class="tooltipArea" style="visibility: hidden;"
100                 tal:condition="widget/help"
101                 tal:attributes="id tooltip_id;
102                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
103                 >
104              <tal:block tal:content="widget/help">This is the help for this field
105              </tal:block>
106            </div>
107            <tal:block condition="err">
108              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
109                <br /><em style="color: red"
110                          tal:content="msg">err</em>
111              </tal:block>
112            </tal:block>
113          </td>
114        </div>
115      </tal:block>
116    </tr>
117  </table>
118  <br />
119  <input type="submit"
120         class="standalone"
121         name="cpsdocument_create_button"
122         tal:attributes="value options/button"
123         tal:condition="creation" />
124
125</form>
126</metal:block>
Note: See TracBrowser for help on using the repository browser.