##parameters=REQUEST # $Id: display_pume_result.py 892 2006-11-18 21:14:18Z henrik $ """ process the Application Form return html renderer + psm """ import DateTime current = DateTime.DateTime() pr = context.portal_registration type_name = 'StudentApplication' ti = context.portal_types[type_name] REQUEST.set('type_name',type_name) validate = REQUEST.has_key("cpsdocument_create_button") lt = context.portal_layouts pr = context.portal_registration res,psm,ds = lt.renderLayout(layout_id= 'student_application_search', schema_id= 'student_application', context=context, mapping=validate and REQUEST, ob={}, layout_mode='create', formaction = "display_pume_result", button = "Search", ) if psm == 'invalid': return context.display_pume_result_form(rendered = res, psm = "Please correct your input!", #psm = "%s, %s" % (psm,ds), firstlayout = True, lastlayout = True, ds = ds, ) elif psm == '': return context.display_pume_result_form(rendered = res, psm = None, firstlayout = True, lastlayout = True, ds = ds, ) elif psm == 'valid': url = "%s/campus/students/%s/pume/pume_anon_view" % (context.portal_url(),ds['s_id']) return REQUEST.RESPONSE.redirect(url) return