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

Last change on this file since 490 was 486, checked in by joachim, 18 years ago

svn -R propset svn:keywords "Id" .
added layout_application_/edit/create/view
and cleaned that up.

  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1<!-- a layout_lib macro -->
2<!-- $Id: layout_application_edit.pt 486 2006-09-06 10:09:39Z joachim $ -->
3<metal:block define-macro="default_edit"
4  tal:define="layout options/layout;
5  ds options/datastructure;
6  dm ds/getDataModel;
7  formaction formaction|string:student_edit;
8  creation creation|nothing;
9  metadata metadata|nothing;
10  type_name request/type_name|nothing;
11  ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
12  cpsmcat nocall:here/translation_service;
13  ">
14
15  <form action="" id="editForm" method="post"
16        enctype="multipart/form-data" class="workflow"
17        tal:attributes="action formaction"
18        >
19  <table width="200" cellpadding="2" cellspacing="2" summary="Form layout"
20         tal:condition="layout/rows">
21    <tr tal:repeat="row layout/rows" valign="top">
22      <td tal:repeat="cell row"
23          tal:attributes="colspan cell/ncols">
24        <tal:block define="widget cell/widget;
25        wid widget/getWidgetId;
26        err python:ds.getError(wid);
27        err_mapping python:ds.getErrorMapping(wid);
28        is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
29        tooltip_id python:wid + '_help';
30        widget_css_class cell/widget_css_class|nothing;
31        css_class python:test(err, 'row error','row')"
32        >
33          <div tal:attributes="class widget_css_class;
34          id python:widget.getHtmlWidgetId()+'_widget';"
35          >
36            <div class="label" tal:condition="widget/label_edit"
37                 tal:attributes="class python:test(is_required, 'label required','label')">
38              <label tal:content="widget/label_edit"
39                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
40            </div>
41            <button type="button" class="tooltipControl"
42                    tal:condition="widget/help"
43                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
44            <div class="field">
45              <div tal:replace="structure cell/widget_rendered"/>
46            </div>
47            <div class="tooltipArea" style="visibility: hidden;"
48                 tal:condition="widget/help"
49                 tal:attributes="id tooltip_id;
50                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
51                 >
52              <tal:block tal:content="widget/help">This is the help for this field
53              </tal:block>
54            </div>
55            <tal:block condition="err">
56              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
57                <br /><em style="color: red"
58                          tal:content="msg">err</em>
59              </tal:block>
60            </tal:block>
61          </div>
62        </tal:block>
63       </td>
64      </tr>
65    </table>
66
67  <input type="submit" class="standalone" name="cpsdocument_edit_button"
68    value="button_change" i18n:attributes="value" id="cpsdocument_edit_button"
69    tal:condition="not:creation" />
70  <input type="submit" class="standalone" name="cpsdocument_edit_and_view_button"
71    value="button_change_and_view" i18n:attributes="value"
72    id="cpsdocument_edit_and_view_button"
73    tal:condition="python:0 and not creation" />
74  <input type="submit"
75         class="standalone"
76         name="cpsdocument_create_button"
77         value="apply"
78         i18n:attributes="value" tal:condition="creation" />
79
80</form>                             
81</metal:block>
Note: See TracBrowser for help on using the repository browser.