--- loncom/interface/lonpreferences.pm 2009/02/19 16:12:21 1.143 +++ loncom/interface/lonpreferences.pm 2009/02/23 20:25:44 1.144 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.143 2009/02/19 16:12:21 hauer Exp $ +# $Id: lonpreferences.pm,v 1.144 2009/02/23 20:25:44 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1215,8 +1215,10 @@ sub passwordchanger { Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changepass', text => 'Change Password'}); - $r->print(Apache::loncommon::start_page('Change Password')); - $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Password')); + unless ($caller eq 'reset_by_email') { + $r->print(Apache::loncommon::start_page('Change Password')); + $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Password')); + } if ((!defined($caller)) || ($caller eq 'preferences')) { $user = $env{'user.name'}; $domain = $env{'user.domain'}; @@ -1552,14 +1554,20 @@ ENDERROR # Inform the user the password has (not?) been changed my $message; if ($result =~ /^ok$/) { - $message = &mt('The password for [_1] was successfully changed',$user); - print_main_menu($r, $message); + $message = &mt('The password for [_1] was successfully changed.',$user); + if ($caller eq 'reset_by_email') { + $r->print($message.'
'); + } else { + &print_main_menu($r, $message); + } # $r->print("

".&mt('The password for [_1] was successfully changed',$user)."

"); } else { # error error: run in circles, scream and shout - $message = &mt("The password for [_1] was not changed",$user) + $message = &mt("The password for [_1] was not changed.",$user).' '. .&mt('Please make sure your old password was entered correctly.'); - print_main_menu($r, $message); + unless ($caller eq 'reset_by_email') { + &print_main_menu($r, $message); + } # $r->print("

".&mt("The password for [_1] was not changed",$user)."

". # &mt('Please make sure your old password was entered correctly.')); return 1;