X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FUser%2FPrefs.html;h=967f4004d229908101de44932276a27af9cd0b7d;hp=f52fdcbdf9da6f4a18254a7553539d8a4bc9afa7;hb=e9e0cf0989259b94d9758eceff448666a2e5a5cc;hpb=63a268637b2d51a8766412617724b9436439deb6 diff --git a/rt/share/html/User/Prefs.html b/rt/share/html/User/Prefs.html index f52fdcbdf..967f4004d 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-2014 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,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,30 +102,24 @@ + +%if ($UserObj->Privileged) { +<&| /Widgets/TitleBox, title => loc('Signature') &> + + +% } + % $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormLeftColumn' ); -% unless (RT->Config->Get('WebExternalAuth') and !RT->Config->Get('WebFallbackToInternalAuth')) { + <&| /Widgets/TitleBox, title => loc('Password'), id => "user-prefs-password" &> - - - - - - - - -
-<&|/l&>New Password: - - -
-<&|/l&>Retype Password: - - -
+<& /Elements/EditPassword, + User => $UserObj, + Name => [qw(CurrentPass Pass1 Pass2)], +&> -% } <&| /Widgets/TitleBox, title => loc('Location'), id => "user-prefs-location" &> @@ -175,29 +167,30 @@
-% $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormRightColumn' ); - - - - - -%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.

+<&|/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" &> + +<& /Elements/Submit, + Label => loc('Reset secret authentication token'), + Name => "ResetAuthToken", + id => "ResetAuthTokenContainer" &> + - + +% $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormRightColumn' ); + + @@ -221,57 +214,60 @@ unless ( $UserObj->id ) { if $Name; Abort(loc("Couldn't load user")); } +$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 -); +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 + ); -$m->callback( - CallbackName => 'UpdateLogic', - fields => \@fields, - results => \@results, - UserObj => $UserObj, - ARGSRef => \%ARGS, -); + $m->callback( + CallbackName => 'UpdateLogic', + fields => \@fields, + results => \@results, + UserObj => $UserObj, + ARGSRef => \%ARGS, + ); -push @results, UpdateRecordObject ( - AttributesRef => \@fields, - Object => $UserObj, - ARGSRef => \%ARGS, -); + push @results, UpdateRecordObject ( + AttributesRef => \@fields, + Object => $UserObj, + ARGSRef => \%ARGS, + ); -push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj ); + push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj ); -if ( $Lang ) { - $session{'CurrentUser'}->LanguageHandle($Lang); - $session{'CurrentUser'} = $session{'CurrentUser'}; # force writeback -} + # 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)); + } -# 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); + } } -#TODO: make this report errors properly -if ( defined $Pass1 and length $Pass1 and $Pass1 eq $Pass2 and !$UserObj->IsPassword($Pass1) ) { - my ($code, $msg); - ($code, $msg) = $UserObj->SetPassword($Pass1); - push @results, loc('Password: [_1]', loc_fuzzy($msg)); -} elsif ( defined $Pass1 && length $Pass1 && $Pass1 ne $Pass2 ) { - push @results, loc("Passwords do not match. Your password has not been changed"); -} -if ( $ARGS{'ResetAuthToken'} ) { - my ($status, $msg) = $UserObj->GenerateAuthToken; - push @results, $msg; -} +MaybeRedirectForResults( + Actions => \@results, +); @@ -308,7 +304,8 @@ $City => undef $State => undef $Zip => undef $Country => undef +$CurrentPass => undef $Pass1 => undef -$Pass2=> undef +$Pass2 => undef $Create=> undef