source: WAeUP_SRP/base/skins/cps_custom/reconfig.py @ 2539

Last change on this file since 2539 was 2454, checked in by Henrik Bettermann, 17 years ago

rebuild getNextInfo.py completely
fetch session from portal properties.xml
change all scripts using getSessionId
remove StudentCourseResult? relevant code from event services
make pay_by_sc.py and interswitch_cb.py work (rebuild both)

File size: 1.2 KB
Line 
1##parameters=REQUEST
2#$Id: reconfig.py 33523 2006-02-27 16:17:45Z fguillaume $
3"""
4This script just saves the portal properties from the reconfig_form
5template.
6"""
7
8portal = context.portal_url.getPortalObject()
9form = REQUEST.form
10
11# The portal_properties API is dumb, so we change properties directly
12# on the portal object.
13portal.manage_changeProperties(
14    email_from_name=form.get('email_from_name'),
15    email_from_address=form.get('email_from_address'),
16    title=form.get('title'),
17    description=form.get('description'),
18    session=form.get('session'),
19    )
20
21# Update membership tool properties
22portal.portal_membership.manage_changeProperties(
23    enable_password_reset=form.get('enable_password_reset'),
24    enable_password_reminder=form.get('enable_password_reminder'),
25    )
26
27# Update registration tool properties
28portal.portal_registration.manage_changeProperties(
29    enable_portal_joining=form.get('enable_portal_joining'),
30    )
31
32# Update MailHost properties
33portal.portal_properties.editProperties({
34    'smtp_server': form.get('smtp_server'),
35    })
36
37url = '%s/config_form?portal_status_message=psm_portal_reconfigured'
38return REQUEST.RESPONSE.redirect(url % portal.portal_url())
Note: See TracBrowser for help on using the repository browser.