source: WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_default/layout_wo_object_create.pt @ 6371

Last change on this file since 6371 was 1393, checked in by joachim, 18 years ago

new method book_reserved_bed to book a reserved bed for a student

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