Last change
on this file since 1864 was
1774,
checked in by joachim, 18 years ago
|
add importEdit (untested)
|
-
Property svn:keywords set to
Id
|
File size:
1.4 KB
|
Line | |
---|
1 | ##parameters=REQUEST |
---|
2 | # $Id: import.py 1774 2007-05-11 15:33:54Z joachim $ |
---|
3 | """ |
---|
4 | process the Application Form |
---|
5 | return html renderer + psm |
---|
6 | """ |
---|
7 | import DateTime |
---|
8 | from urllib import urlencode |
---|
9 | current = DateTime.DateTime() |
---|
10 | pr = context.portal_registration |
---|
11 | |
---|
12 | validate = REQUEST.has_key("import") |
---|
13 | |
---|
14 | lt = context.portal_layouts |
---|
15 | #pr = context.portal_registration |
---|
16 | |
---|
17 | res,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 | ) |
---|
25 | if psm == 'invalid': |
---|
26 | return context.import_form(rendered = res, |
---|
27 | psm = "Please correct your input!", |
---|
28 | ds = ds, |
---|
29 | ) |
---|
30 | elif psm == '': |
---|
31 | return context.import_form(rendered = res, |
---|
32 | psm = None, |
---|
33 | ds = ds, |
---|
34 | ) |
---|
35 | elif psm == 'valid': |
---|
36 | pass |
---|
37 | psm = context.waeup_tool.importData(ds.get('filename'), |
---|
38 | ds.get('name'), |
---|
39 | ds.get('import_or_edit') |
---|
40 | ) |
---|
41 | return context.import_form(rendered = res, |
---|
42 | psm = psm, |
---|
43 | ds = ds, |
---|
44 | ) |
---|
Note: See
TracBrowser for help on using the repository browser.