1 ##parameters=change='', ajax=''
3 from Products
.CMFCore
.utils
import getUtilityByInterfaceName
4 from Products
.CMFCore
.utils
import getToolByName
6 atool
= getToolByName(script
, 'portal_actions')
7 ptool
= getUtilityByInterfaceName('Products.CMFCore.interfaces.IPropertiesTool')
9 form
= context
.REQUEST
.form
11 context
.portal_config_control(**form
) and \
12 context
.setRedirect(atool
, 'global/configPortal', ajax
=ajax
):
18 target
= atool
.getActionInfo('global/configPortal')['url']
20 buttons
.append( {'name': 'change', 'value': 'Change'} )
22 ajax_config
= ptool
.getProperty('ajax_config')
23 options
['form'] = { 'action': target
,
24 'email_from_name': ptool
.getProperty('email_from_name'),
25 'email_from_address': ptool
.getProperty('email_from_address'),
26 'smtp_server': ptool
.smtp_server(),
27 'title': ptool
.title(),
28 'description': ptool
.getProperty('description'),
29 'keywords': '\n'.join(ptool
.getProperty('keywords', [])),
30 'copyright_notice': ptool
.getProperty('copyright_notice'),
31 'validate_email': ptool
.getProperty('validate_email'),
32 'default_charset': ptool
.getProperty('default_charset', ''),
33 'slide_size' : ptool
.getProperty('slide_size', ''),
34 'listButtonInfos': tuple(buttons
),
35 'ajax_rootClickHandler' : ajax_config
& 1 == 1,
36 'ajax_autoFormManager' : ajax_config
& 2 == 2 }
38 return context
.reconfig_template(**options
)