Last change
on this file since 47 was
47,
checked in by joachim, 19 years ago
|
=weitere
|
-
Property svn:keywords set to
Id
|
File size:
1.4 KB
|
Line | |
---|
1 | ##parameters=REQUEST |
---|
2 | # $Id: check_admission.py 47 2005-10-14 13:01:35Z joachim $ |
---|
3 | """ |
---|
4 | process the Admission Form |
---|
5 | |
---|
6 | return html renderer + psm |
---|
7 | """ |
---|
8 | type_name = 'Jamb' |
---|
9 | ti = context.portal_types[type_name] |
---|
10 | |
---|
11 | REQUEST.set('type_name',type_name) |
---|
12 | |
---|
13 | validate = REQUEST.has_key("cpsdocument_edit_button") |
---|
14 | |
---|
15 | #student = context.getContent() |
---|
16 | student = context |
---|
17 | |
---|
18 | #jamb = getattr(student,'my-jamb').getContent() |
---|
19 | jamb = getattr(student,'my-jamb') |
---|
20 | |
---|
21 | ##res = jamb.validateStoreRender(request=REQUEST, |
---|
22 | ## layout_mode='create', |
---|
23 | ## layout_mode_ok='admitted', |
---|
24 | ## layout_mode_err='create', |
---|
25 | ## layout_id='admission', |
---|
26 | ## ) |
---|
27 | |
---|
28 | lt = context.portal_layouts |
---|
29 | |
---|
30 | res,psm,ds = lt.renderLayout(layout_id= 'admission', |
---|
31 | schema_id= 'jamb', |
---|
32 | context=context, |
---|
33 | mapping=validate and REQUEST, |
---|
34 | ob={}, |
---|
35 | layout_mode='create', |
---|
36 | ) |
---|
37 | if psm == 'invalid': |
---|
38 | return context.check_admission_form(rendered = res, |
---|
39 | psm = psm, |
---|
40 | ds = ds, |
---|
41 | ) |
---|
42 | |
---|
43 | elif psm == 'valid': |
---|
44 | return context.student_admitted_form(rendered = res, |
---|
45 | psm = psm, |
---|
46 | student = student, |
---|
47 | jamb = jamb, |
---|
48 | ) |
---|
49 | |
---|
50 | return res,psm,ds |
---|
51 | |
---|
Note: See
TracBrowser for help on using the repository browser.