CC-4786: Refresh page when language setting changes

-configure localization and reinitiliaze edit user form after the user locale is set
This commit is contained in:
denise 2013-01-10 14:01:03 -05:00
parent dffe932223
commit a0be1c647e
1 changed files with 3 additions and 2 deletions

View File

@ -153,13 +153,14 @@ class UserController extends Zend_Controller_Action
$user->setJabber($formData['cu_jabber']);
$user->save();
Application_Model_Preference::SetUserLocale($user->getId(), $formData['cu_locale']);
Application_Model_Preference::SetUserTimezone($user->getId(), $formData['cu_timezone']);
//configure localization with new locale setting
Application_Model_Locale::configureLocalization($formData['cu_locale']);
//reinitialize form so language gets translated
$form = new Application_Form_EditUser();
Application_Model_Preference::SetUserLocale($user->getId(), $formData['cu_locale']);
Application_Model_Preference::SetUserTimezone($user->getId(), $formData['cu_timezone']);
$this->view->successMessage = "<div class='success'>"._("Settings updated successfully!")."</div>";
}
$this->view->form = $form;