Ignore:
Timestamp:
7 Apr 2008, 10:42:13 (17 years ago)
Author:
Henrik Bettermann
Message:

apply_admission.py: fixed

manage mode removed

application_manage layout extended

Location:
WAeUP_SRP/base/skins/waeup_student
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/apply_admission.py

    r3416 r3426  
    2929request = REQUEST
    3030
    31 manage = "manage" in request.keys()
     31#manage = "manage" in request.keys()
    3232screening_types = ('prence','pume','pce','pde','cest','sandwich')
    33 if not (traverse_subpath and traverse_subpath[0] in screening_types) and not manage:
     33if not (traverse_subpath and traverse_subpath[0] in screening_types):
    3434    return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
    3535configuration = []
     
    102102mode = request.get('mode','')
    103103if not mode:
    104     if apply_admission or edit or manage:
     104    if apply_admission or edit:
    105105        mode = "edit"
    106106    elif slip:
     
    110110validate = create or edit or apply_admission
    111111
    112 if manage:
    113     validate = False
    114112without_reg_no = False
    115113
     
    177175        submitted = True
    178176    # cannot happen anymore but anyway
    179     if not (create or slip) and (pin != object['pin'] and not context.isSectionOfficer()):
    180         logger.info('%s/%s entered wrong pin %s' % (member,reg_no,pin))
    181         return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
     177    #if not (create or slip) and (pin != object['pin'] and not context.isSectionOfficer()):
     178    #    logger.info('%s/%s entered wrong pin %s' % (member,reg_no,pin))
     179    #    return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
    182180
    183181    #rerender with current object = application-record
    184    
     182
    185183    if slip:
    186184        mode = "view_slip"
    187185        logger.info('%s/%s views application slip' % (member,reg_no))
    188    
     186
    189187    res,psm,ds = lt.renderLayout(layout_id= layout,
    190188                                schema_id= 'import_application',
     
    201199                                            ds = ds,
    202200                                            info = info,
    203                                            )                               
    204                                
     201                                           )
     202
    205203    if psm == 'invalid':
    206204        return context.apply_admission_form(rendered = res,
     
    224222        data[field] = dm.get(field)
    225223data['reg_no'] = reg_no
    226 if manage:
    227     if submitted:
    228         mode = "view"
    229         psm = "You are now assuming the applicant's role!"
    230         logger.info('%s/%s entered application record' % (member,reg_no))
    231         # res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= layout,
    232         #                         schema_id= 'import_application',
    233         #                         layout_mode = mode,
    234         #                         context=context,
    235         #                         mapping={},
    236         #                         ob=object,
    237         #                         commit = False,
    238         #                         )
    239     else:
    240         mode = "edit"
    241         psm = "You are now assuming the applicant's role!"
    242         logger.info('%s/%s entered application record' % (member,reg_no))
    243 elif apply_admission:
     224
     225if apply_admission:
    244226    if submitted:
    245227        mode = "view"
  • WAeUP_SRP/base/skins/waeup_student/apply_admission_form.pt

    r3421 r3426  
    4141          <div tal:replace="structure rendered_main" />
    4242         
    43           <metal:block tal:condition="python: show_submit and mode == 'edit'">
     43          <metal:block tal:condition="python: show_submit and mode == 'edit' and not expired">
    4444            <br/>
    4545            <input type="checkbox" class="standalone"
     
    5555                 name="edit"
    5656                 value="Save"
    57                  tal:condition="python: mode == 'edit' and not expired" />
     57                 tal:condition="python: mode == 'edit'" />
    5858          <input type="submit" class="standalone" name="apply"
    5959                 value="Final Submit"
Note: See TracChangeset for help on using the changeset viewer.