Ignore:
Timestamp:
12 Nov 2006, 17:01:34 (18 years ago)
Author:
joachim
Message:

new logig for the Apply/Finally? in application_edit and clearance_edit
the field acknow can be removed from clearance schema and layouts (to be done)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_edit.py

    r847 r851  
    55##bind script=script
    66##bind subpath=traverse_subpath
    7 ##parameters=REQUEST,proceed=None, cpsdocument_edit_button=None, final_submit=None, action=None
     7##parameters=REQUEST, cpsdocument_edit_button=None, cpsdocument_edit_and_view_button=None, acknowledge=None
    88##title=
    99# $Id$
     
    3434clear_doc = info['clear_doc']
    3535state = context.getStudentInfo()['review_state']
    36 if final_submit:
    37     wftool.doActionFor(info['clear'],'close')
    38     wftool.doActionFor(info['student'],'request_clearance')
    39     return REQUEST.RESPONSE.redirect("%s/student_index" % info['url'])
    4036
    4137is_valid, ds = clear_doc.validate(request=REQUEST,
     
    4844args = {}
    4945action = "/clearance_edit_form"
    50 if cpsdocument_edit_button:
    51     if is_valid:
     46if is_valid:
     47    if cpsdocument_edit_button:
    5248        psm = 'Content changed.'
    5349        if ds.get('acknow'):
    5450            args['final_submit'] = "Finally Submit"
    55     else:
    56         args = getFormUidUrlArg(REQUEST)
    57         psm = "Please correct your errors."
    58         args['portal_status_message'] = psm
     51    elif cpsdocument_edit_and_view_button:
     52        if acknowledge:
     53            wftool.doActionFor(info['clear'],'close')
     54            wftool.doActionFor(info['student'],'request_clearance')
     55            return REQUEST.RESPONSE.redirect("%s/student_index" % info['url'])
     56        psm = "You didn't check the Acknowledgementbox"
     57else:
     58    psm = "Please correct your errors."
     59args = getFormUidUrlArg(REQUEST)
     60args['portal_status_message'] = psm
    5961if args:
    6062  url = clear.absolute_url() + action + '?' + urlencode(args)
Note: See TracChangeset for help on using the changeset viewer.