Rev | Line | |
---|
[1805] | 1 | ##parameters=REQUEST |
---|
| 2 | # $Id: display_pume_result.py 970 2006-11-30 12:16:52Z joachim $ |
---|
| 3 | """ |
---|
| 4 | process the Application Form |
---|
| 5 | return html renderer + psm |
---|
| 6 | """ |
---|
| 7 | import DateTime |
---|
| 8 | current = DateTime.DateTime() |
---|
| 9 | pr = context.portal_registration |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | type_name = 'StudentApplication' |
---|
| 13 | ti = context.portal_types[type_name] |
---|
| 14 | REQUEST.set('type_name',type_name) |
---|
| 15 | |
---|
| 16 | validate = REQUEST.has_key("cpsdocument_create_button") |
---|
| 17 | |
---|
| 18 | lt = context.portal_layouts |
---|
| 19 | pr = context.portal_registration |
---|
| 20 | |
---|
[1892] | 21 | res,psm,ds = lt.renderLayout('student_application_search', |
---|
| 22 | 'student_application', |
---|
| 23 | context, |
---|
| 24 | mapping=validate and REQUEST, |
---|
| 25 | layout_mode='create', |
---|
| 26 | ob={"jamb_reg_no": '',}, |
---|
| 27 | commit=False, |
---|
| 28 | formaction = "display_cest_results", |
---|
| 29 | button = "Search", |
---|
| 30 | ) |
---|
[1896] | 31 | if psm == 'invalid': |
---|
[1805] | 32 | return context.display_cest_results_form(rendered = res, |
---|
| 33 | psm = "Please correct your input!", |
---|
| 34 | #psm = "%s, %s" % (psm,ds), |
---|
| 35 | firstlayout = True, |
---|
| 36 | lastlayout = True, |
---|
| 37 | ds = ds, |
---|
| 38 | ) |
---|
| 39 | elif psm == '': |
---|
| 40 | return context.display_cest_results_form(rendered = res, |
---|
| 41 | psm = None, |
---|
| 42 | firstlayout = True, |
---|
| 43 | lastlayout = True, |
---|
| 44 | ds = ds, |
---|
| 45 | ) |
---|
| 46 | elif psm == 'valid': |
---|
| 47 | return context.entry_results_anon_view(pume=ds['pume']) |
---|
| 48 | |
---|
Note: See
TracBrowser for help on using the repository browser.