Commit 405f8764 authored by Ivan Tyagov's avatar Ivan Tyagov

Set user prefered language at first login step.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23811 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 439e447a
...@@ -422,7 +422,7 @@ class WizardTool(BaseTool): ...@@ -422,7 +422,7 @@ class WizardTool(BaseTool):
parameter_dict['erp5_url'] = self.getPortalObject().absolute_url() parameter_dict['erp5_url'] = self.getPortalObject().absolute_url()
# add user preffered language # add user preffered language
parameter_dict['user_preferred_language'] = getattr(self, 'user_preferred_language', 'en') parameter_dict['user_preferred_language'] = getattr(self, 'user_preferred_language', 'en')
def _updateParameterDictWithFileUpload(self, parameter_dict): def _updateParameterDictWithFileUpload(self, parameter_dict):
"""Updates parameter_dict to replace file upload with their file content, """Updates parameter_dict to replace file upload with their file content,
encoded as XML-RPC Binary encoded as XML-RPC Binary
...@@ -568,6 +568,10 @@ class WizardTool(BaseTool): ...@@ -568,6 +568,10 @@ class WizardTool(BaseTool):
user_id = self.getExpressConfigurationPreference('preferred_express_user_id') user_id = self.getExpressConfigurationPreference('preferred_express_user_id')
password = REQUEST.get('field_my_ac_password', '') password = REQUEST.get('field_my_ac_password', '')
if self._isCorrectConfigurationKey(user_id, password): if self._isCorrectConfigurationKey(user_id, password):
# set user preferred configuration language
user_preferred_language = REQUEST.get('field_my_user_preferred_language', None)
if user_preferred_language:
self.user_preferred_language = user_preferred_language
# set encoded __ac_express cookie at client's browser # set encoded __ac_express cookie at client's browser
__ac_express = quote(encodestring(password)) __ac_express = quote(encodestring(password))
expires = (DateTime() + 1).toZone('GMT').rfc822() expires = (DateTime() + 1).toZone('GMT').rfc822()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment