source: WAeUP_SRP/trunk/skins/waeup_default/layout_search_edit.pt @ 1065

Last change on this file since 1065 was 805, checked in by joachim, 18 years ago

propset Id

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