X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FUser%2FPrefs.html;h=a108bea64d32942d9cca043084019429908a034f;hp=884cf85e4060081cd3d6ef617d5cb092507ef22c;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=e70abd21bab68b23488f7ef1ee2e693a3b365691 diff --git a/rt/share/html/User/Prefs.html b/rt/share/html/User/Prefs.html index 884cf85e4..a108bea64 100755 --- a/rt/share/html/User/Prefs.html +++ b/rt/share/html/User/Prefs.html @@ -1,40 +1,40 @@ %# BEGIN BPS TAGGED BLOCK {{{ -%# +%# %# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%# -%# +%# +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC +%# +%# %# (Except where explicitly superseded by other copyright notices) -%# -%# +%# +%# %# LICENSE: -%# +%# %# This work is made available to you under the terms of Version 2 of %# the GNU General Public License. A copy of that license should have %# been provided with this software, but in any event can be snarfed %# from www.gnu.org. -%# +%# %# This work is distributed in the hope that it will be useful, but %# WITHOUT ANY WARRANTY; without even the implied warranty of %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU %# General Public License for more details. -%# +%# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at %# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -%# -%# +%# +%# %# CONTRIBUTION SUBMISSION POLICY: -%# +%# %# (The following paragraph is not intended to limit the rights granted %# to you to modify and distribute this software under the terms of %# the GNU General Public License and is only of importance to you if %# you choose to contribute your changes and enhancements to the %# community by submitting them to Best Practical Solutions, LLC.) -%# +%# %# By intentionally submitting any modifications, corrections or %# derivatives to this work, or any other work intended for use with %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,12 +43,10 @@ %# royalty-free, perpetual, license to use, copy, create derivative %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. -%# +%# %# END BPS TAGGED BLOCK }}} -<& /Elements/Header, Title=>loc("Preferences") &> -<& /User/Elements/Tabs, - current_tab => 'User/Prefs.html', - Title => loc("Preferences") &> +<& /Elements/Header, Title=>loc("Ticketing Preferences") &> +<& /Elements/Tabs &> <& /Elements/ListActions, actions => \@results &> @@ -74,14 +72,15 @@ <&|/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 &> +<& /Elements/EditCustomFields, Object => $UserObj, Grouping => 'Identity', InTable => 1 &> <&| /Widgets/TitleBox, title => loc('Phone numbers'), id => "user-prefs-phone" &> @@ -102,8 +101,17 @@ <&|/l&>Pager: +<& /Elements/EditCustomFields, Object => $UserObj, Grouping => 'Phones', InTable => 1 &> + +%if ($UserObj->Privileged) { +<&| /Widgets/TitleBox, title => loc('Signature'), id => "user-prefs-signature" &> + + +% } + % $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormLeftColumn' ); @@ -113,6 +121,9 @@ User => $UserObj, Name => [qw(CurrentPass Pass1 Pass2)], &> + +<& /Elements/EditCustomFields, Object => $UserObj, Grouping => 'Access control' &> + <&| /Widgets/TitleBox, title => loc('Location'), id => "user-prefs-location" &> @@ -145,51 +156,47 @@ <&|/l&>Country: +<& /Elements/EditCustomFields, Object => $UserObj, Grouping => 'Location', InTable => 1 &> -<&| /Widgets/TitleBox, title => loc('Custom Fields') &> - -% my $CustomFields = $UserObj->CustomFields; -% while ( my $CF = $CustomFields->Next ) { - - - -% } -
<% loc( $CF->Name ) %>:<& /Elements/EditCustomField, - %ARGS, Object => $UserObj, CustomField => $CF -&>
- -% $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormRightColumn' ); - - +<& /Elements/EditCustomFieldCustomGroupings, Object => $UserObj &> - -%if ($UserObj->Privileged) { -
-<&| /Widgets/TitleBox, title => loc('Signature') &> - - -% } - - -<&| /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('Save Preferences') &> + +<&| /Widgets/TitleBox, title => loc('Secret authentication token'), id => "user-prefs-feeds" &> -<& /Elements/Submit, Label => loc('Reset secret authentication token'), Name => "ResetAuthToken" &> +<&|/l&>All iCal feeds embed a secret token which authorizes you. If the URL for one of your iCal feeds was 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 +218,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, +); +