[LON-CAPA-cvs] cvs: loncom /interface resetpw.pm
bisitz
bisitz at source.lon-capa.org
Fri Jul 19 12:17:07 EDT 2013
bisitz Fri Jul 19 16:17:07 2013 EDT
Modified files:
/loncom/interface resetpw.pm
Log:
- Bug #6643: Improved standard layout and navigation for password successfully set
- Remove deprecated breadcrumb component (no new information anyway)
- Correct headline level
- Filename style for e-mail address
Index: loncom/interface/resetpw.pm
diff -u loncom/interface/resetpw.pm:1.32 loncom/interface/resetpw.pm:1.33
--- loncom/interface/resetpw.pm:1.32 Mon Mar 25 16:33:08 2013
+++ loncom/interface/resetpw.pm Fri Jul 19 16:17:07 2013
@@ -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.33 2013/07/19 16:17:07 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -91,13 +91,10 @@
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 @@
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('<h3>'.&mt('Reset forgotten LON-CAPA password').'</h3>');
+ $r->print('<h2>'.&mt('Reset forgotten LON-CAPA password').'</h2>');
my $output;
if ($token) {
$output = &reset_passwd($r,$token,$contact_name,$contact_email);
@@ -328,23 +324,24 @@
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 .=
- '<p class="LC_success">'
- .&mt('An e-mail confirming setting of the password'
- .' for your LON-CAPA account has been sent to [_1].'
- ,$data{'email'})
- .'</p>';
+ $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].'
+ ,'<span class="LC_filename">'.$data{'email'}.'</span>'));
} else {
- $msg .=
- '<p class="LC_error">'
- .&mt('An error occurred when sending e-mail to [_1]'
- .' confirming setting of your new password.'
- ,$data{'email'})
- .'</p>';
+ $confirm_msg =
+ &Apache::lonhtmlcommon::confirm_success(
+ &mt('An error occurred when sending e-mail to [_1]'
+ .' confirming setting of your new password.'
+ ,'<span class="LC_filename">'.$data{'email'}.'</span>'),1);
}
- $msg .= '<br />'
- .'<a href="/adm/login">'.&mt('Go to the login page').'</a>.';
+ $msg .=
+ &Apache::loncommon::confirmwrapper($confirm_msg)
+ .&Apache::lonhtmlcommon::actionbox([
+ '<a href="/adm/login">'.&mt('Go to the login page').'</a>']);
} elsif ($change_failed eq 'invalid_client') {
my $homeserver = &Apache::lonnet::homeserver($data{'username'},$data{'domain'});
if ($homeserver eq 'no_host') {
More information about the LON-CAPA-cvs
mailing list