Correction localisation.
[Plinn.git] / Products / Plinn / skins / custom_control / personalize.py
1 ## Script (Python) "personalize"
2 ##title=Personalization Handler.
3 ##parameters=
4 REQUEST=context.REQUEST
5 member = context.portal_membership.getAuthenticatedMember()
6
7 failMessage = context.portal_registration.testPropertiesValidity(REQUEST,
8 member)
9 if failMessage:
10 REQUEST.set('portal_status_message', failMessage)
11 return context.personalize_form(context, REQUEST,
12 portal_status_message=failMessage)
13
14 member.setProperties(REQUEST)
15 #photo_width = REQUEST['photo_width']
16 #context.getOrSetSessionVar(key = 'preferedImageSize', value=(photo_width, photo_width))
17
18 if REQUEST.has_key('portal_skin'):
19 context.portal_skins.updateSkinCookie()
20
21 from ZTUtils import make_query as mq
22 params = {'portal_status_message' : 'Saved changes.'}
23 if REQUEST.has_key('ajax') :
24 params['ajax'] = '1'
25 qs = mq(**params)
26
27 context.REQUEST.RESPONSE.redirect('%s/personalize_form?%s' % (context.portal_url(), qs))