[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonpreferences.pm
raeburn
raeburn at source.lon-capa.org
Mon Dec 10 15:55:44 EST 2012
raeburn Mon Dec 10 20:55:44 2012 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface lonpreferences.pm
Log:
- For 2.11.
- Backport 1.199.
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.196.4.5 loncom/interface/lonpreferences.pm:1.196.4.6
--- loncom/interface/lonpreferences.pm:1.196.4.5 Mon Aug 27 16:30:31 2012
+++ loncom/interface/lonpreferences.pm Mon Dec 10 20:55:44 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.196.4.5 2012/08/27 16:30:31 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.196.4.6 2012/12/10 20:55:44 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1346,8 +1346,11 @@
} elsif ($caller eq 'reset_by_email') {
my %data = &Apache::lonnet::tmpget($mailtoken);
if (keys(%data) == 0) {
- $r->print(&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'
+ $r->print(
+ '<p class="LC_warning">'
+ .&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'
,'<a href="/adm/resetpw">','</a>')
+ .'</p>'
);
return;
}
@@ -1357,18 +1360,32 @@
$domain = $data{'domain'};
$currentpass = $data{'temppasswd'};
} else {
- $r->print(&mt('Sorry, the token generated when you requested a password reset has expired.').'<br />');
+ $r->print(
+ '<p class="LC_warning">'
+ .&mt('Sorry, the token generated when you requested'
+ .' a password reset has expired.')
+ .'</p>'
+ );
return;
}
} else {
- $r->print(&mt('Sorry, the URL generated when you requested reset of your password contained incomplete information.').'<br />');
+ $r->print(
+ '<p class="LC_warning">'
+ .&mt('Sorry, the URL generated when you requested reset of'
+ .' your password contained incomplete information.')
+ .'</p>'
+ );
return;
}
if (&Apache::lonnet::domain($domain) eq '') {
$domain = $r->dir_config('lonDefDomain');
}
} else {
- $r->print(&mt('Page requested in unexpected context').'<br />');
+ $r->print(
+ '<p class="LC_error">'
+ .&mt('Page requested in unexpected context')
+ .'</p>'
+ );
return;
}
my $currentauth=&Apache::lonnet::queryauthenticate($user,$domain);
@@ -1640,14 +1657,14 @@
}
if ($newpass1 ne $newpass2) {
&passwordchanger($r,
- '<span class="LC_error">'.
+ '<span class="LC_warning">'.
&mt('The new passwords you entered do not match.').' '.
&mt('Please try again.').'</span>',$caller,$mailtoken);
return 1;
}
if (length($newpass1) < 7) {
&passwordchanger($r,
- '<span class="LC_error">'.
+ '<span class="LC_warning">'.
&mt('Passwords must be a minimum of 7 characters long.').' '.
&mt('Please try again.').'</span>',$caller,$mailtoken);
return 1;
@@ -1660,7 +1677,7 @@
}
if ($badpassword) {
# I can't figure out how to enter bad characters on my browser.
- my $errormessage ='<span class="LC_error">'.
+ my $errormessage ='<span class="LC_warning">'.
&mt('The password you entered contained illegal characters.').'<br />'.
&mt('Valid characters are').(<<"ENDERROR");
: space and <br />
More information about the LON-CAPA-cvs
mailing list