source: WAeUP_SRP/trunk/skins/waeup_default/import.py @ 1764

Last change on this file since 1764 was 1756, checked in by joachim, 18 years ago

New form import
added portal status message to main_template

  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1##parameters=REQUEST
2# $Id: import.py 1756 2007-05-08 15:01:11Z joachim $
3"""
4process the Application Form
5return html renderer + psm
6"""
7import DateTime
8from urllib import urlencode
9current = DateTime.DateTime()
10pr = context.portal_registration
11
12validate = REQUEST.has_key("import")
13
14lt = context.portal_layouts
15#pr = context.portal_registration
16
17res,psm,ds = lt.renderLayout(layout_id= 'import',
18                      schema_id= 'import',
19                      context=context,
20                      mapping=validate and REQUEST,
21                      ob={},
22                      layout_mode='create',
23                      commit=False,
24                      )
25if psm == 'invalid':
26    return context.import_form(rendered = res,
27                                 psm = "Please correct your input!",
28                                 ds = ds,
29                                 )
30elif psm == '':
31    return context.import_form(rendered = res,
32                                 psm = None,
33                                 ds = ds,
34                                 )
35elif psm == 'valid':
36    pass
37psm = context.waeup_tool.importData(ds.get('filename'),ds.get('name'))
38return context.import_form(rendered = res,
39                                 psm = psm,
40                                 ds = ds,
41                                 )
Note: See TracBrowser for help on using the repository browser.