X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FUser%2FPrefs.html;h=d491145e03bdefb80e502d829f4efd9823f10ad2;hp=09875c99a0d1320a62690db6b78e8a98faa0410e;hb=919e930aa9279b3c5cd12b593889cd6de79d67bf;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984 diff --git a/rt/share/html/User/Prefs.html b/rt/share/html/User/Prefs.html index 09875c99a..d491145e0 100755 --- a/rt/share/html/User/Prefs.html +++ b/rt/share/html/User/Prefs.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -46,9 +46,7 @@ %# %# END BPS TAGGED BLOCK }}} <& /Elements/Header, Title=>loc("Ticketing Preferences") &> -<& /User/Elements/Tabs, - current_tab => 'User/Prefs.html', - Title => loc("Preferences") &> +<& /Elements/Tabs &> <& /Elements/ListActions, actions => \@results &> @@ -74,10 +72,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 &> @@ -104,6 +102,14 @@ + +%if ($UserObj->Privileged) { +<&| /Widgets/TitleBox, title => loc('Signature') &> + + +% } + % $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormLeftColumn' ); @@ -161,35 +167,37 @@ -% $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormRightColumn' ); - - - - - -%if ($UserObj->Privileged) { -
-<&| /Widgets/TitleBox, title => loc('Signature') &> - - -% } - +<& /Elements/Submit, Label => loc('Save Preferences') &> - <&| /Widgets/TitleBox, title => loc('Secret authentication token'), id => "user-prefs-feeds" &> -<&|/l&>

All iCal feeds embed a secret token which authorizes you. If the URL one of your iCal feeds got exposed to the outside world, you can get a new secret, breaking all existing iCal feeds below.

- -<& /Elements/Submit, Label => loc('Reset secret authentication token'), Name => "ResetAuthToken" &> +<&|/l&>All iCal feeds embed a secret token which authorizes you. If the URL one of your iCal feeds got exposed to the outside world, you can get a new secret, breaking all existing iCal feeds below. + + +<& /Elements/Submit, + Label => loc('Reset secret authentication token'), + Name => "ResetAuthToken", + id => "ResetAuthTokenContainer" &> + - + +% $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormRightColumn' ); + + % $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormEnd' ); -<& /Elements/Submit, Label => loc('Save Preferences') &> @@ -211,56 +219,57 @@ $id = $UserObj->id; my @results; -my @fields = qw( - Name Comments Signature EmailAddress FreeformContactInfo - Organization RealName NickName Lang EmailEncoding WebEncoding - ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId - AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1 - Address2 City State Zip Country Lang Timezone -); - -$m->callback( - CallbackName => 'UpdateLogic', - fields => \@fields, - results => \@results, - UserObj => $UserObj, - ARGSRef => \%ARGS, -); - -push @results, UpdateRecordObject ( - AttributesRef => \@fields, - Object => $UserObj, - ARGSRef => \%ARGS, -); - -push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj ); - -if ( $Lang ) { - $session{'CurrentUser'}->LanguageHandle($Lang); - $session{'CurrentUser'} = $session{'CurrentUser'}; # force writeback +if ( $ARGS{'ResetAuthToken'} ) { + my ($status, $msg) = $UserObj->GenerateAuthToken; + push @results, $msg; } +else { + my @fields = qw( + Name Comments Signature EmailAddress FreeformContactInfo + Organization RealName NickName Lang EmailEncoding WebEncoding + ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId + AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1 + Address2 City State Zip Country Timezone + ); -# Deal with special fields: Privileged, Enabled, and Password -if ( $SetPrivileged and $Privileged != $UserObj->Privileged ) { - my ($code, $msg) = $UserObj->SetPrivileged( $Privileged ); - push @results, loc('Privileged status: [_1]', loc_fuzzy($msg)); -} + $m->callback( + CallbackName => 'UpdateLogic', + fields => \@fields, + results => \@results, + UserObj => $UserObj, + ARGSRef => \%ARGS, + ); -my %password_cond = $UserObj->CurrentUserRequireToSetPassword; -if (defined $Pass1 && length $Pass1 ) { - my ($status, $msg) = $UserObj->SafeSetPassword( - Current => $CurrentPass, - New => $Pass1, - Confirmation => $Pass2, + push @results, UpdateRecordObject ( + AttributesRef => \@fields, + Object => $UserObj, + ARGSRef => \%ARGS, ); - push @results, loc("Password: [_1]", $msg); -} -if ( $ARGS{'ResetAuthToken'} ) { - my ($status, $msg) = $UserObj->GenerateAuthToken; - push @results, $msg; + push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj ); + + # Deal with special fields: Privileged, Enabled, and Password + if ( $SetPrivileged and $Privileged != $UserObj->Privileged ) { + my ($code, $msg) = $UserObj->SetPrivileged( $Privileged ); + push @results, loc('Privileged status: [_1]', loc_fuzzy($msg)); + } + + my %password_cond = $UserObj->CurrentUserRequireToSetPassword; + if (defined $Pass1 && length $Pass1 ) { + my ($status, $msg) = $UserObj->SafeSetPassword( + Current => $CurrentPass, + New => $Pass1, + Confirmation => $Pass2, + ); + push @results, loc("Password: [_1]", $msg); + } } + +MaybeRedirectForResults( + Actions => \@results, +); +