source: WAeUP_SRP/branches/uli/skins/waeup_student/display_pume_results.py @ 8672

Last change on this file since 8672 was 1123, checked in by Henrik Bettermann, 18 years ago
File size: 1.6 KB
Line 
1##parameters=REQUEST
2# $Id: display_pume_result.py 970 2006-11-30 12:16:52Z joachim $
3"""
4process the Application Form
5return html renderer + psm
6"""
7import DateTime
8current = DateTime.DateTime()
9pr = context.portal_registration
10
11
12type_name = 'StudentApplication'
13ti = context.portal_types[type_name]
14REQUEST.set('type_name',type_name)
15
16validate = REQUEST.has_key("cpsdocument_create_button")
17
18lt = context.portal_layouts
19pr = context.portal_registration
20
21res,psm,ds = lt.renderLayout(layout_id= 'student_application_search',
22                      schema_id= 'student_application',
23                      context=context,
24                      mapping=validate and REQUEST,
25                      ob={},
26                      layout_mode='create',
27                      formaction = "display_pume_results",
28                      button = "Search",
29                      commit=False,
30                      )
31if psm == 'invalid':
32    return context.display_pume_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                                 )
39elif psm == '':
40    return context.display_pume_results_form(rendered = res,
41                                 psm = None,
42                                 firstlayout = True,
43                                 lastlayout = True,
44                                 ds = ds,
45                                 )
46elif psm == 'valid':
47    return context.entry_results_anon_view(pume=ds['pume'])
48
Note: See TracBrowser for help on using the repository browser.