--- loncom/interface/resetpw.pm 2013/03/25 16:33:08 1.32 +++ loncom/interface/resetpw.pm 2013/08/17 00:34:29 1.36 @@ -1,7 +1,7 @@ # The LearningOnline Network # Allow access to password changing via a token sent to user's e-mail. # -# $Id: resetpw.pm,v 1.32 2013/03/25 16:33:08 bisitz Exp $ +# $Id: resetpw.pm,v 1.36 2013/08/17 00:34:29 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -91,13 +91,10 @@ sub handler { my $udom = $env{'form.udom'}; my $token = $env{'form.token'}; my $brcrum = []; - my $bread_crumbs_component = 'Forgotten Password'; if ($token) { push (@{$brcrum}, {href => '/adm/resetpw', text => 'Update Password'}); - - $bread_crumbs_component = 'Reset Password'; } else { push (@{$brcrum}, {href => '/adm/resetpw', @@ -108,10 +105,9 @@ sub handler { text => 'Result'}); } } - my $args = {bread_crumbs => $brcrum, - bread_crumbs_component => $bread_crumbs_component}; + my $args = {bread_crumbs => $brcrum}; $r->print(&Apache::loncommon::start_page('Reset password','',$args)); - $r->print('
' @@ -237,7 +236,6 @@ sub send_token { .' associated with your LON-CAPA account.') .'
' .&display_actions($contact_email,$domdesc); - } } else { $msg .= @@ -328,23 +326,24 @@ sub reset_passwd { my $mailmsg = &mt('The password for your LON-CAPA account in the [_1] domain was changed [_2] from IP address: [_3]. If you did not perform this change or authorize it, please contact the [_4] ([_5]).',$domdesc,$now,$ENV{'REMOTE_ADDR'},$contact_name,$contact_email)."\n"; my $result = &send_mail($domdesc,$data{'email'},$mailmsg, $contact_name,$contact_email); + my $confirm_msg; if ($result eq 'ok') { - $msg .= - '' - .&mt('An e-mail confirming setting of the password' - .' for your LON-CAPA account has been sent to [_1].' - ,$data{'email'}) - .'
'; + $confirm_msg = + &Apache::lonhtmlcommon::confirm_success( + &mt('An e-mail confirming setting of the password' + .' for your LON-CAPA account has been sent to [_1].' + ,''.$data{'email'}.'')); } else { - $msg .= - '' - .&mt('An error occurred when sending e-mail to [_1]' - .' confirming setting of your new password.' - ,$data{'email'}) - .'
'; + $confirm_msg = + &Apache::lonhtmlcommon::confirm_success( + &mt('An error occurred when sending e-mail to [_1]' + .' confirming setting of your new password.' + ,''.$data{'email'}.''),1); } - $msg .= ''
.&mt('A problem occurred when attempting to reset the password for your account.')
.'
'
- .&mt('Please contact the [_1] - ([_2]) for assistance.',
+ .&mt('Please contact the [_1] ([_2]) for assistance.',
$contact_name,''.$contact_email.'')
.'