Changeset 2328


Ignore:
Timestamp:
8 Oct 2007, 15:12:24 (17 years ago)
Author:
Henrik Bettermann
Message:

improve application forms

Location:
WAeUP_SRP
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_layout/layout_apply_admission_create.pt

    r2310 r2328  
    2222                           err python:ds.getError(wid);
    2323                           err_mapping python:ds.getErrorMapping(wid);
    24                            is_required widget/is_required|nothing;
    25                            tooltip_id python:wid + '_help';
    2624                           widget_css_class cell/widget_css_class|nothing;
    2725                           css_class python:test(err, 'row error','row')">
  • WAeUP_SRP/base/skins/waeup_student/apply_admission.py

    r2324 r2328  
    4848if manage:
    4949    validate = False
    50 #layout = "application_pume"
    51 #screening_type = ""
    5250without_reg_no = False
    5351
    54 # if traverse_subpath and traverse_subpath[0] == "prence":
    55 #     layout = "application_prence"
    56 #     screening_type = "prence"
    57 #     without_reg_no = True
    58 # elif traverse_subpath and traverse_subpath[0] == "pume":
    59 #     layout = "application_pume"
    60 #     screening_type = "pume"
    61 # elif traverse_subpath and traverse_subpath[0] == "pce":
    62 #     layout = "application_pce"
    63 #     screening_type = "pce"
    64 # elif traverse_subpath and traverse_subpath[0] == "pde":
    65 #     layout = "application_pde"
    66 #     screening_type = "pde"
    67 # elif traverse_subpath and traverse_subpath[0] == "cest":
    68 #     layout = "application_cest"
    69 #     screening_type = "cest"
    70 # else:
    71 #     return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
    72 screening_types = ('prence','pume','pce','pde','cest')
    73 headings = {}
    74 headings['pume'] = 'Apply for Post UME Screening Test (2007/2008)! '
    75 headings['pde'] = 'Apply for Post DE Screening Test(2007/2008)! '
    76 headings['prence'] = 'Apply for Pre-NCE Programme (2007/2008)! '
    77 headings['pce'] = 'Apply for PCE Screening (2007/2008)! '
    78 headings['cest'] = 'Apply for Common Entrance Screening Test (2007/2008)! '
    79 info = {}
    80 if traverse_subpath and traverse_subpath[0] in screening_types:
    81     screening_type = info['screening_type'] = traverse_subpath[0]
    82     info['heading'] = headings[screening_type]
    83     layout = "application_%s" % screening_type
    84     without_reg_no = screening_type in ('prence',)
    85 
    86 else:
    87     return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
     52
    8853lt = context.portal_layouts
    8954
     
    11681            #logger.info('%s/%s entered wrong pin %s' % (member,reg_no,pin))
    11782            #return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
     83
     84
     85screening_types = ('prence','pume','pce','pde','cest')
     86headings = {}
     87headings['pume'] = 'Apply for Post UME Screening Test (2007/2008)! '
     88headings['pde'] = 'Apply for Post DE Screening Test(2007/2008)! '
     89headings['prence'] = 'Apply for Pre-NCE Programme (2007/2008)! '
     90headings['pce'] = 'Apply for PCE Screening (2007/2008)! '
     91headings['cest'] = 'Apply for Common Entrance Screening Test (2007/2008)! '
     92headings_slip = {}
     93headings_slip['pume'] = 'Post UME Screening (2007/2008) Aknowledgement Slip!'
     94headings_slip['pde'] = 'Post DE Screening (2007/2008) Aknowledgement Slip'
     95headings_slip['prence'] = 'Pre-NCE Application (2007/2008) Aknowledgement Slip'
     96headings_slip['pce'] = 'PCE Screening (2007/2008) Aknowledgement Slip'
     97headings_slip['cest'] = 'Common Entrance Screening (2007/2008) Aknowledgement Slip'
     98info = {}
     99if traverse_subpath and traverse_subpath[0] in screening_types:
     100    screening_type = info['screening_type'] = traverse_subpath[0]
     101    info['heading'] = headings[screening_type]
     102    info['heading_slip'] = headings_slip[screening_type]
     103    layout = "application_%s" % screening_type
     104    without_reg_no = screening_type in ('prence',)
     105elif manage:
     106    if object['screening_type']:
     107        st = object['screening_type']
     108    else:
     109        st = 'pume'
     110    screening_type = info['screening_type'] = st
     111    info['heading'] = headings[screening_type]
     112    info['heading_slip'] = headings_slip[screening_type]
     113    layout = "application_%s" % screening_type
     114    without_reg_no = screening_type in ('prence',) 
     115else:
     116    return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
     117
    118118
    119119if slip:
     
    160160        data[field] = dm.get(field)
    161161data['reg_no'] = reg_no
    162 data['screening_type'] = screening_type
     162
    163163if apply_admission:
    164164    if submitted:
  • WAeUP_SRP/base/skins/waeup_student/apply_admission_slip.pt

    r2310 r2328  
    55           mode options/mode;
    66           name python:ds['lastname'];
     7           info options/info;
    78           "
    89           >
     
    1011    <metal:block use-macro="here/slip_template/macros/master">
    1112      <metal:block fill-slot="main">
    12         <h3>Post UME Screening (2007/2008) Aknowledgement Slip</h3>
     13        <h3 tal:content="info/heading_slip" />
    1314        <br />
    1415        <div tal:replace="structure rendered_main" />
    1516       
    1617        The applicant has confirmed that the picture shown on this slip is a true picture of him/her.
    17         <br/><br/>
    18         Please check for your screening venue at any of the UNIBEN entry gates or
    19         at the Sports Complex and come to the screening venue with a copy of this slip. 
     18
    2019      </metal:block>
    2120    </metal:block>
  • WAeUP_SRP/base/skins/waeup_utilities/deleteResultByKey.py

    r2097 r2328  
    2525students = context.portal_url.getPortalObject().campus.students
    2626if str(member) not in ('admin','joachim','med','despej') or key is None:
    27     return
     27    return 'You are not allowed to execute this command!'
    2828
    2929output = []
  • WAeUP_SRP/fceokene/profiles/default/layouts/application_manage.xml

    r2322 r2328  
    278278      <element value="lastname"/>
    279279    </property>
    280     <property name="label">Surname</property>
    281     <property name="label_edit">Surname</property>
     280    <property name="label">Surname / Full Name</property>
     281    <property name="label_edit">Surname / Full Name</property>
    282282    <property name="description"></property>
    283283    <property name="help"></property>
     
    444444  </widget>
    445445  <widget name="reg_no" meta_type="JambRegNo Widget">
    446     <property name="title">JAMB Registration Number</property>
     446    <property name="title">Registration Number</property>
    447447    <property name="fields">
    448448      <element value="reg_no"/>
    449449    </property>
    450     <property name="label">JAMB Registration Number</property>
    451     <property name="label_edit">JAMB Registration Number</property>
     450    <property name="label">Registration Number</property>
     451    <property name="label_edit">Registration Number</property>
    452452    <property name="description"></property>
    453453    <property name="help"></property>
     
    480480    <property name="hidden_readonly_layout_modes"/>
    481481  </widget>
    482   <widget name="sex" meta_type="WAeUP Sex Widget">
    483     <property name="title">Sex</property>
    484     <property name="fields">
    485       <element value="sex"/>
    486     </property>
    487     <property name="label">Sex</property>
    488     <property name="label_edit">Sex</property>
    489     <property name="description"></property>
    490     <property name="help"></property>
    491     <property name="is_i18n">False</property>
    492     <property name="widget_mode_expr"></property>
    493     <property name="readonly_layout_modes"/>
    494     <property name="hidden_layout_modes"/>
    495     <property name="hidden_readonly_layout_modes"/>
    496     <property name="css_class_expr">string:row</property>
    497   </widget>
     482 <widget name="sex" meta_type="Boolean Widget">
     483  <property name="title">Sex</property>
     484  <property name="fields">
     485   <element value="sex"/>
     486  </property>
     487  <property name="label">Sex</property>
     488  <property name="label_edit">Sex</property>
     489  <property name="readonly_layout_modes"/>
     490  <property name="hidden_layout_modes"/>
     491  <property name="hidden_readonly_layout_modes"/>
     492  <property name="label_false">male</property>
     493  <property name="label_true">female</property>
     494  <property name="render_format">select</property>
     495 </widget>
    498496  <widget name="state" meta_type="WAeUP LGA Widget">
    499497    <property name="title">State</property>
     
    624622  <row>
    625623   <cell name="middlenames" ncols="2"/>
    626   </row> 
     624  </row>
    627625  <row>
    628626   <cell name="lastname" ncols="2"/>
     
    630628  <row>
    631629   <cell name="date_of_birth" ncols="2"/>
     630  </row>
     631  <row>
     632   <cell name="sex" ncols="2"/>
    632633  </row>
    633634  <row>
  • WAeUP_SRP/fceokene/profiles/default/layouts/application_prence.xml

    r2322 r2328  
    2626      <element value="create"/>
    2727      <element value="edit"/>
     28      <element value="view"/>
     29      <element value="view_slip"/>
    2830    </property>
    2931    <property name="hidden_readonly_layout_modes"/>
     
    4244    <property name="label_edit">Date of Birth (dd/mm/yyyy)</property>
    4345    <property name="description"></property>
     46    <property name="is_required">True</property>
    4447    <property name="help"></property>
    4548    <property name="is_i18n">False</property>
     
    129132    <property name="label_edit">First Name</property>
    130133    <property name="description"></property>
    131     <property name="help"></property>
    132     <property name="is_i18n">False</property>
    133     <property name="widget_mode_expr"></property>
    134     <property name="readonly_layout_modes"/>
    135     <property name="hidden_layout_modes"/>
     134    <property name="is_required">True</property>
     135    <property name="help"></property>
     136    <property name="is_i18n">False</property>
     137    <property name="widget_mode_expr"></property>
     138    <property name="readonly_layout_modes"/>
     139    <property name="hidden_layout_modes">
     140      <element value="create"/>
     141    </property>
    136142    <property name="hidden_readonly_layout_modes"/>
    137143    <property name="css_class_expr">string:row</property>
     
    308314    <property name="label_edit">Surname</property>
    309315    <property name="description"></property>
    310     <property name="help"></property>
    311     <property name="is_i18n">False</property>
    312     <property name="widget_mode_expr"></property>
    313     <property name="readonly_layout_modes">
    314     </property>
    315     <property name="hidden_layout_modes">
    316       <element value="create"/>
    317     </property>
    318     <property name="hidden_readonly_layout_modes"/>
    319     <property name="css_class_expr">string:row</property>
    320   </widget>
    321   <widget name="lga" meta_type="WAeUP LGA Widget">
    322     <property name="title">LGA</property>
    323     <property name="fields">
    324       <element value="lga"/>
    325     </property>
    326     <property name="label">LGA</property>
    327     <property name="label_edit">LGA</property>
    328     <property name="description"></property>
    329     <property name="help"></property>
    330     <property name="is_i18n">False</property>
    331     <property name="widget_mode_expr"></property>
    332     <property name="readonly_layout_modes"/>
    333     <property name="hidden_layout_modes"/>
    334     <property name="hidden_readonly_layout_modes"/>
    335     <property name="css_class_expr">string:row</property>
    336   </widget>
     316    <property name="is_required">True</property>
     317    <property name="help"></property>
     318    <property name="is_i18n">False</property>
     319    <property name="widget_mode_expr"></property>
     320    <property name="readonly_layout_modes">
     321    </property>
     322    <property name="hidden_layout_modes">
     323      <element value="create"/>
     324    </property>
     325    <property name="hidden_readonly_layout_modes"/>
     326    <property name="css_class_expr">string:row</property>
     327  </widget>
     328 <widget name="lga" meta_type="Select Widget">
     329  <property name="title">Local Government Area</property>
     330  <property name="fields">
     331   <element value="lga"/>
     332  </property>
     333  <property name="label">Local Government Area</property>
     334  <property name="label_edit">Local Government Area</property>
     335  <property name="readonly_layout_modes">
     336  </property>
     337  <property name="hidden_layout_modes">
     338   <element value="create"/>
     339  </property>
     340  <property name="hidden_readonly_layout_modes"/>
     341  <property name="vocabulary">local_gov_areas</property>
     342 </widget>
    337343  <widget name="middlenames" meta_type="String Widget">
    338344    <property name="title">Middle Names</property>
     
    347353    <property name="widget_mode_expr"></property>
    348354    <property name="readonly_layout_modes"/>
    349     <property name="hidden_layout_modes"/>
    350     <property name="hidden_readonly_layout_modes"/>
     355    <property name="hidden_layout_modes">
     356      <element value="create"/>
     357    </property>
     358    <property name="hidden_readonly_layout_modes"/>
     359    <property name="sorted">True</property>
    351360    <property name="css_class_expr">string:row</property>
    352361  </widget>
     
    485494    <property name="hidden_readonly_layout_modes"/>
    486495  </widget>
    487   <widget name="sex" meta_type="WAeUP Sex Widget">
    488     <property name="title">Sex</property>
    489     <property name="fields">
    490       <element value="sex"/>
    491     </property>
    492     <property name="label">Sex</property>
    493     <property name="label_edit">Sex</property>
    494     <property name="description"></property>
    495     <property name="help"></property>
    496     <property name="is_i18n">False</property>
    497     <property name="widget_mode_expr"></property>
    498     <property name="readonly_layout_modes"/>
    499     <property name="hidden_layout_modes">
    500       <element value="create"/>
    501     </property>
    502     <property name="hidden_readonly_layout_modes"/>
    503     <property name="css_class_expr">string:row</property>
    504   </widget>
     496 <widget name="sex" meta_type="Boolean Widget">
     497  <property name="title">Sex</property>
     498  <property name="fields">
     499   <element value="sex"/>
     500  </property>
     501  <property name="label">Sex</property>
     502  <property name="label_edit">Sex</property>
     503  <property name="readonly_layout_modes"/>
     504  <property name="hidden_layout_modes"/>
     505  <property name="hidden_readonly_layout_modes"/>
     506  <property name="label_false">male</property>
     507  <property name="label_true">female</property>
     508  <property name="render_format">select</property>
     509 </widget>
    505510  <widget name="state" meta_type="WAeUP LGA Widget">
    506511    <property name="title">State</property>
     
    634639  <row>
    635640   <cell name="middlenames" ncols="2"/>
     641  </row>
     642  <row>
     643   <cell name="lastname" ncols="2"/>
     644  </row>
     645  <row>
     646   <cell name="sex" ncols="2"/>
     647  </row>
     648  <row>
     649   <cell name="date_of_birth" ncols="2"/>
     650  </row>
     651  <row>
     652   <cell name="lga" ncols="2"/>
    636653  </row> 
    637   <row>
    638    <cell name="lastname" ncols="2"/>
    639   </row>
    640   <row>
    641    <cell name="sex" ncols="2"/>
    642   </row>
    643   <row>
    644    <cell name="date_of_birth" ncols="2"/>
    645   </row>
    646654  <row>
    647655   <cell name="email" ncols="2"/>
Note: See TracChangeset for help on using the changeset viewer.