From 8c1852c540807f0f06e62984f13d71de929e9159 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 29 Jun 2011 19:36:34 +0000 Subject: [PATCH 1/1] sync locale settings with RT, #13073 --- httemplate/pref/pref-process.html | 10 ++++++++++ rt/share/html/User/Prefs.html | 8 ++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/httemplate/pref/pref-process.html b/httemplate/pref/pref-process.html index 6f3518561..4ff878fd7 100644 --- a/httemplate/pref/pref-process.html +++ b/httemplate/pref/pref-process.html @@ -73,4 +73,14 @@ unless ( $error ) { # if ($access_user) { } +if ( !$error and ($FS::TicketSystem::system || '') eq 'RT_Internal' ) { + # sync RT user locale on every update + my $locale = $access_user->option('locale'); + FS::TicketSystem->init; + my $UserObj = FS::TicketSystem->session('')->{'CurrentUser'}->UserObj; + # Bypass RT ModifySelf ACL + $UserObj->CurrentUser( RT::SystemUser ); + my ($val, $msg) = $UserObj->SetLang($locale); + $error = $msg if !$val; +} diff --git a/rt/share/html/User/Prefs.html b/rt/share/html/User/Prefs.html index 09875c99a..c62d8737c 100755 --- a/rt/share/html/User/Prefs.html +++ b/rt/share/html/User/Prefs.html @@ -74,10 +74,10 @@ <&|/l&>Nickname: - - <&|/l&>Language: - <& /Elements/SelectLang, Name => 'Lang', Default => $UserObj->Lang &> - +%# +%# <&|/l&>Language: +%# <& /Elements/SelectLang, Name => 'Lang', Default => $UserObj->Lang &> +%# <&|/l&>Timezone: <& /Elements/SelectTimezone, Name => 'Timezone', Default => $UserObj->Timezone &> -- 2.11.0