Changeset 701 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
14 Oct 2006, 12:37:50 (18 years ago)
Author:
joachim
Message:

created new layout-method layout_enter_access_code.pt
and use this for application create and accommodation create. Actually now
layout_application_create is now no longer neccessary.

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/layout_application_create.pt

    r486 r701  
    11<tal:block define="global creation python:1;
    22                   global formaction string:apply_admission" />
    3 <metal:block use-macro="here/layout_application_edit/macros/default_edit" />
     3<!-- a layout_lib macro -->
     4<!-- $Id$ -->
     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|string:student_edit;
     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  widgets python:context.getRenderedWidgets(layout);
     18  ">
     19  <form action="" id="editForm" method="post"
     20        enctype="multipart/form-data" class="workflow"
     21        tal:attributes="action formaction"
     22        >
     23  <table class="layoutDefault" summary="Form layout"
     24         tal:condition="layout/rows">
     25    <span tal:repeat="row python: layout['rows']" valign="top" >
     26      <span tal:repeat="cell row">
     27        <tr tal:define="widget cell/widget;
     28              wid widget/getWidgetId;
     29              err python:ds.getError(wid);
     30              err_mapping python:ds.getErrorMapping(wid);
     31              is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
     32              tooltip_id python:wid + '_help';
     33              widget_css_class cell/widget_css_class|nothing;
     34              css_class python:test(err, 'row error','row')"
     35              tal:condition="python: wid != 'passport'"
     36              >
     37          <div tal:attributes="class widget_css_class;
     38          id python:widget.getHtmlWidgetId()+'_widget';"
     39          >
     40            <td>
     41            <div class="label" tal:condition="widget/label_edit"
     42                 tal:attributes="class python:test(is_required, 'label required','label')">
     43              <label tal:content="widget/label_edit"
     44                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
     45            </div>
     46            <button type="button" class="tooltipControl"
     47                    tal:condition="widget/help"
     48                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
     49            </td>
     50            <td>
     51            <span class="field">
     52              <div tal:replace="structure cell/widget_rendered"/>
     53            </span>
     54            <div class="tooltipArea" style="visibility: hidden;"
     55                 tal:condition="widget/help"
     56                 tal:attributes="id tooltip_id;
     57                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
     58                 >
     59              <tal:block tal:content="widget/help">This is the help for this field
     60              </tal:block>
     61            </div>
     62            <tal:block condition="err">
     63              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
     64                <br /><em style="color: red"
     65                          tal:content="msg">err</em>
     66              </tal:block>
     67            </tal:block>
     68            </td>
     69          </div>
     70        </tr>
     71      </span>
     72    </span>
     73    <tr tal:condition="widgets/passport|nothing"
     74        tal:define="cell widgets/passport|nothing;">
     75      <tal:block tal:define="widget cell/widget;
     76      wid widget/getWidgetId;
     77      err python:ds.getError(wid);
     78      err_mapping python:ds.getErrorMapping(wid);
     79      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
     80      tooltip_id python:wid + '_help';
     81      widget_css_class widget/widget_css_class|nothing;
     82      css_class python:test(err, 'row error','row')"
     83      >
     84        <div tal:attributes="class widget_css_class;
     85        id python:widget.getHtmlWidgetId()+'_widget';"
     86        >
     87          <td>
     88            <div class="label" tal:condition="widget/label_edit"
     89                 tal:attributes="class python:test(is_required, 'label required','label')">
     90              <label tal:content="widget/label_edit"
     91                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
     92            </div>
     93            <button type="button" class="tooltipControl"
     94                    tal:condition="widget/help"
     95                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
     96          </td>
     97          <td>
     98            <span class="field">
     99              <div tal:replace="structure cell/widget_rendered"/>
     100            </span>
     101            <div class="tooltipArea" style="visibility: hidden;"
     102                 tal:condition="widget/help"
     103                 tal:attributes="id tooltip_id;
     104                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
     105                 >
     106              <tal:block tal:content="widget/help">This is the help for this field
     107              </tal:block>
     108            </div>
     109            <tal:block condition="err">
     110              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
     111                <br /><em style="color: red"
     112                          tal:content="msg">err</em>
     113              </tal:block>
     114            </tal:block>
     115          </td>
     116        </div>
     117      </tal:block>
     118    </tr>
     119  </table>
     120  <br />
     121  <input type="submit" class="standalone" name="cpsdocument_edit_button"
     122         value="Save"
     123         id="cpsdocument_edit_button"
     124         tal:condition="not:creation" />
     125  <input type="submit" class="standalone" name="apply_admission"
     126         value="apply for admission"
     127         id="cpsdocument_edit_and_view_button"
     128         tal:condition="apply"
     129         tal:attributes="value apply"/>
     130  <input type="submit"
     131         class="standalone"
     132         name="cpsdocument_create_button"
     133         value="apply"
     134         tal:attributes="value options/button"
     135         tal:condition="creation" />
     136
     137</form>
     138</metal:block>
  • WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py

    r686 r701  
    3232if psm == 'invalid':
    3333    return context.accommodation_pin_form(rendered = res,
    34                                  #psm = "Please correct your input.",
    35                                  psm = "%s, %s" % (psm,ds),
     34                                 psm = "Please correct your input.",
     35                                 #psm = "%s, %s" % (psm,ds),
    3636                                 firstlayout = True,
    3737                                 lastlayout = True,
Note: See TracChangeset for help on using the changeset viewer.