source: WAeUP_SRP/base/skins/waeup_layout/layout_application_edit.pt @ 2588

Last change on this file since 2588 was 2581, checked in by Henrik Bettermann, 17 years ago

finished, please test

File size: 2.4 KB
RevLine 
[2579]1<metal:define tal:define="isStaff context/isStaff;
[2581]2                          isStudent context/isStudent;
3                          info context/getApplicationInfo;
4                          app_email info/app_doc/app_email">
[2579]5
6<metal:block tal:condition="isStaff">              
7<metal:block use-macro="here/layout_waeup_edit/macros/default_edit"/>              
8</metal:block>       
9
10
11<metal:block define-macro="application_student_edit"
[2581]12  tal:condition="python:isStudent and not app_email"
[2243]13  tal:define="layout options/layout;
14  ds options/datastructure;
15  dm ds/getDataModel;
16  formaction options/formaction|string:application_edit;
17  creation creation|nothing;
18  cpsmcat nocall:here/translation_service;
19  proceed options/proceed|nothing;
20  widgets python:context.getRenderedWidgets(layout);
[2579]21  fields python:( 'app_email',
22                  'app_mobile',)">
[2243]23  <table class="layoutDefault" summary="Form layout"
24         tal:condition="layout/rows">
[2581]25
26    <tr tal:condition="widgets/app_email|nothing"
27        tal:define="cell widgets/app_email|nothing;">
[2243]28      <tal:block tal:define="widget cell/widget;
29      wid widget/getWidgetId;
30      err python:ds.getError(wid);
31      err_mapping python:ds.getErrorMapping(wid);
32      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
33      widget_css_class widget/widget_css_class|nothing;
[2581]34      css_class python:test(err, 'row error','row')">
[2243]35        <div tal:attributes="class widget_css_class;
[2581]36        id python:widget.getHtmlWidgetId()+'_widget';">
[2243]37          <td>
38            <div class="label" tal:condition="widget/label_edit"
39                 tal:attributes="class python:test(is_required, 'label required','label')">
40              <label tal:content="widget/label_edit"
41                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
42            </div>
43          </td>
44          <td>
45            <span class="field">
46              <div tal:replace="structure cell/widget_rendered"/>
47            </span>
48            <tal:block condition="err">
49              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
50                <br /><em style="color: red"
51                          tal:content="msg">err</em>
52              </tal:block>
53            </tal:block>
54          </td>
55        </div>
56      </tal:block>
57    </tr>
58  </table>
59</metal:block>
[2579]60</metal:define>
Note: See TracBrowser for help on using the repository browser.