source: WAeUP_SRP/trunk/skins/waeup_student/layout_sc_create.pt @ 296

Last change on this file since 296 was 185, checked in by Henrik Bettermann, 19 years ago
File size: 4.5 KB
Line 
1<tal:block define="global creation python:1" />
2<metal:block define-macro="default_edit"
3             tal:define="layout options/layout;
4             ds options/datastructure;
5             creation creation|nothing;
6             metadata metadata|nothing;
7             type_name request/type_name|nothing;
8             ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
9             creation_form python:ti and ti.getActionById('create', 'cpsdocument_create_form') or 'cpsdocument_create_form' ;
10             edit_form     python:ti and ti.getActionById('edit',   'cpsdocument_edit_form') or  'cpsdocument_edit_form';
11             metadata_form python:ti and ti.getActionById('metadata', 'cpsdocument_metadata') or 'cpsdocument_metadata';
12             formaction options/action;
13             submittext options/submit;
14             first_layout options/first_layout|python:0;
15             last_layout options/last_layout|python:0;
16             is_flexible options/is_flexible;
17             cpsmcat nocall:here/translation_service;
18             "
19             >
20  <form action='check_admission' tal:attributes="action formaction" method='post'
21        enctype='multipart/form-data' class='workflow'>
22    <div class=''>
23      <div class='documentFields'>
24        <table width="100%" 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"
80               value="check" tal:attributes="value submittext"/>
81      </div>       
82    </div>
83  </form>
84</metal:block>
85 
Note: See TracBrowser for help on using the repository browser.