diff options
Diffstat (limited to 'rt/share/html/User/Prefs.html')
| -rwxr-xr-x | rt/share/html/User/Prefs.html | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/rt/share/html/User/Prefs.html b/rt/share/html/User/Prefs.html index 884cf85e4..43c981dea 100755 --- a/rt/share/html/User/Prefs.html +++ b/rt/share/html/User/Prefs.html @@ -45,7 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/Header, Title=>loc("Preferences") &> +<& /Elements/Header, Title=>loc("Ticketing Preferences") &> <& /User/Elements/Tabs, current_tab => 'User/Prefs.html', Title => loc("Preferences") &> @@ -107,13 +107,27 @@ % $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormLeftColumn' ); </td> <td valign="top" class="boxcontainer"> - +% unless (RT->Config->Get('WebExternalAuth') and !RT->Config->Get('WebFallbackToInternalAuth')) { <&| /Widgets/TitleBox, title => loc('Password'), id => "user-prefs-password" &> -<& /Elements/EditPassword, - User => $UserObj, - Name => [qw(CurrentPass Pass1 Pass2)], -&> +<table> +<tr> +<td class="label"> +<&|/l&>New Password</&>: +</td> +<td class="value"> +<input type="password" name="Pass1" autocomplete="off"/> +</td> +</tr> +<tr><td class="label"> +<&|/l&>Retype Password</&>: +</td> +<td class="value"> +<input type="password" name="Pass2" autocomplete="off" /> +</td> +</tr> +</table> </&> +% } <&| /Widgets/TitleBox, title => loc('Location'), id => "user-prefs-location" &> <table cellspacing="0" cellpadding="0"> @@ -207,7 +221,6 @@ unless ( $UserObj->id ) { if $Name; Abort(loc("Couldn't load user")); } -$id = $UserObj->id; my @results; @@ -246,14 +259,13 @@ if ( $SetPrivileged and $Privileged != $UserObj->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'} ) { @@ -296,8 +308,7 @@ $City => undef $State => undef $Zip => undef $Country => undef -$CurrentPass => undef $Pass1 => undef -$Pass2 => undef +$Pass2=> undef $Create=> undef </%ARGS> |
