Changeset 2111


Ignore:
Timestamp:
17 Aug 2007, 05:34:36 (17 years ago)
Author:
Henrik Bettermann
Message:

apply_pume.py fixed
2 fields added to applicants_catalog

Location:
WAeUP_SRP/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/profiles/default/applicants_catalog.xml

    r2105 r2111  
    2727 <column value="course2"/>
    2828 <column value="course3"/>
     29 <column value="course_admitted"/>
     30 <column value="screening_type"/>
    2931 <column value="screening_date"/>
    3032 <column value="passport"/>
     
    3941  <indexed_attr value="lastname"/>
    4042 </index>
     43 <index name="screening_type" meta_type="FieldIndex">
     44  <indexed_attr value="screening_type"/>
     45 </index>
     46 <index name="course_admitted" meta_type="FieldIndex">
     47  <indexed_attr value="course_admitted"/>
     48 </index> 
    4149</object>
  • WAeUP_SRP/trunk/profiles/default/layouts/application.xml

    r2108 r2111  
    273273  </widget>
    274274  <widget name="lastname" meta_type="String Widget">
    275     <property name="title">Lastname</property>
     275    <property name="title">Name</property>
    276276    <property name="fields">
    277277      <element value="lastname"/>
    278278    </property>
    279     <property name="label">Lastname</property>
    280     <property name="label_edit">Lastname</property>
     279    <property name="label">Name</property>
     280    <property name="label_edit">Name</property>
    281281    <property name="description"></property>
    282282    <property name="help"></property>
     
    324324    <property name="css_class_expr">string:row</property>
    325325  </widget>
    326   <widget name="passport" meta_type="Ext File Widget">
    327     <property name="title">Passport</property>
    328     <property name="fields">
    329       <element value="passport"/>
    330     </property>
    331     <property name="is_required">True</property>
    332     <property name="label">Passport</property>
    333     <property name="label_edit">Passport</property>
    334     <property name="readonly_layout_modes"/>
    335     <property name="hidden_layout_modes">
    336       <element value="create"/>
    337     </property>
    338     <property name="hidden_readonly_layout_modes"/>
    339     <property name="size_max">50000</property>
    340     <property name="display_external_editor">False</property>
    341   </widget>
    342326  <widget name="phone" meta_type="String Widget">
    343327    <property name="title">Phone</property>
     
    397381    </property>
    398382    <property name="hidden_readonly_layout_modes"/>
     383    <property name="view_format">%d/%m/%Y</property>
     384    <property name="time_setting">False</property>
    399385    <property name="css_class_expr">string:row</property>
    400386  </widget>
     
    417403    </property>
    418404    <property name="hidden_readonly_layout_modes"/>
    419     <property name="css_class_expr">string:row</property>
    420   </widget>
     405    <property name="view_format">%d/%m/%Y</property>
     406    <property name="time_setting">False</property>
     407    <property name="css_class_expr">string:row</property>
     408  </widget>
     409  <widget name="screening_type" meta_type="String Widget">
     410    <property name="title">Screening Type</property>
     411    <property name="fields">
     412      <element value="screening_type"/>
     413    </property>
     414    <property name="label">Screening Type</property>
     415    <property name="label_edit">Screening Type</property>
     416    <property name="description"></property>
     417    <property name="help"></property>
     418    <property name="is_i18n">False</property>
     419    <property name="widget_mode_expr"></property>
     420    <property name="readonly_layout_modes"/>
     421    <property name="hidden_layout_modes"/>
     422    <property name="hidden_readonly_layout_modes"/>
     423    <property name="css_class_expr">string:row</property>
     424  </widget> 
    421425  <widget name="reg_no" meta_type="JambRegNo Widget">
    422426    <property name="title">JAMB Registration Number</property>
     
    568572    <property name="css_class_expr">string:row</property>
    569573  </widget>
     574  <widget name="course_admitted" meta_type="String Widget">
     575    <property name="title">Course of Study</property>
     576    <property name="fields">
     577      <element value="course_admitted"/>
     578    </property>
     579    <property name="label">Course of Study</property>
     580    <property name="label_edit">Course of Study</property>
     581    <property name="description"></property>
     582    <property name="help"></property>
     583    <property name="is_i18n">False</property>
     584    <property name="widget_mode_expr"></property>
     585    <property name="readonly_layout_modes">
     586      <element value="edit"/>
     587    </property>
     588    <property name="hidden_layout_modes">
     589      <element value="create"/>
     590    </property>
     591    <property name="hidden_readonly_layout_modes"/>
     592    <property name="css_class_expr">string:row</property>
     593  </widget> 
    570594
    571595 <table>
  • WAeUP_SRP/trunk/profiles/default/schemas/application.xml

    r2105 r2111  
    55 <field name="course2" meta_type="CPS String Field"/>
    66 <field name="course3" meta_type="CPS String Field"/>
     7 <field name="course_admitted" meta_type="CPS String Field"/>
    78 <field name="entry_mode" meta_type="CPS String Field"/>
    89 <field name="department" meta_type="CPS String Field"/>
     
    2930 <field name="lga" meta_type="CPS String Field"/>
    3031 <field name="screening_date" meta_type="CPS DateTime Field"/>
     32 <field name="screening_type" meta_type="CPS String Field"/>
    3133 <field name="passport" meta_type="CPS String Field"/>
    3234 <field name="status" meta_type="CPS String Field"/>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/cos.xml

    r2108 r2111  
    66  <property name="description"></property>
    77  <property name="acl_write_roles">Manager</property>
    8    
     8
     9<item key="None" msgid="">None</item>
    910<item key="BSCANA" msgid="">B.SC (ANATOMY)</item>
    1011<item key="BARTEDL" msgid="">B.ART (EDO LINGUSTICS)</item>
  • WAeUP_SRP/trunk/skins/waeup_student/apply_pume.py

    r2108 r2111  
    5757if slip:
    5858    mode = "view_slip"
    59    
     59
    6060res,psm,ds = lt.renderLayout(layout_id= 'application',
    6161                             schema_id= 'application',
     
    9797
    9898if apply_pume:
    99     if not request.has_key('confirm'):
     99
     100    if submitted:
     101        mode = "view"
     102        psm = "The form has already been submitted and you are not allowed to resubmit the data!"
     103        res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= 'application',
     104                                schema_id= 'application',
     105                                layout_mode = mode,
     106                                context=context,
     107                                mapping={},
     108                                ob=object,
     109                                commit = False,
     110                                )
     111    elif not request.has_key('confirm'):
    100112        mode = "edit"
    101         psm = "Please confirm Passport Photograph"
     113        psm = "Please confirm Passport Photograph!"
    102114    else:
    103115        mode = "view"
    104         psm = "You successfully applied for PUME"
     116        psm = "You successfully applied for PUME!"
    105117        data['application_date'] = current
    106118        data['status'] = "submitted"
    107         context.applicants_catalog.modifyRecord(**data) 
     119        context.applicants_catalog.modifyRecord(**data)
    108120        res,psm_dummy,ds = lt.renderLayout(layout_id= 'application',
    109121                                schema_id= 'application',
     
    113125                                ob=object,
    114126                                commit = False,
    115                                 )                     
     127                                )
    116128elif create:
    117129    if submitted:
     
    122134    #set_trace()
    123135    object['pin'] = str(ds.get('pin'))
    124     res,psm,dummy = lt.renderLayout(layout_id= 'application',
     136    res,psm,ds_dummy = lt.renderLayout(layout_id= 'application',
    125137                                schema_id= 'application',
    126138                                layout_mode = mode,
     
    131143                                )
    132144elif edit:
    133     mode = "edit"
    134     psm = "Content changed"
     145    if submitted:
     146        mode = "view"
     147        psm = "The form has already been submitted and you are not allowed to modify the data!"
     148        res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= 'application',
     149                                schema_id= 'application',
     150                                layout_mode = mode,
     151                                context=context,
     152                                mapping={},
     153                                ob=object,
     154                                commit = False,
     155                                )
     156    else:
     157        mode = "edit"
     158        psm = "Content changed"
     159        data['status'] = "edited"
     160        context.applicants_catalog.modifyRecord(**data)
    135161
    136162
    137    
     163
    138164return context.apply_pume_form(rendered = res,
    139165                            psm = psm,
Note: See TracChangeset for help on using the changeset viewer.