--- loncom/interface/lonpreferences.pm 2009/08/19 20:03:40 1.169
+++ loncom/interface/lonpreferences.pm 2009/10/08 19:54:37 1.173
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.169 2009/08/19 20:03:40 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.173 2009/10/08 19:54:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1338,6 +1338,8 @@ sub jscript_send {
this.document.client.elements.uname.value;
this.document.pserver.elements.udom.value =
this.document.client.elements.udom.options[this.document.client.elements.udom.selectedIndex].value;
+ this.document.pserver.elements.email.value =
+ this.document.client.elements.email.value;
|;
}
$ output .= qq|
@@ -1422,6 +1424,7 @@ sub server_form {
+
|;
}
@@ -1566,7 +1569,7 @@ ENDERROR
# Inform the user the password has (not?) been changed
my $message;
if ($result =~ /^ok$/) {
- $message = &Apache::lonhtmlcommon::confirm_success(&mt('The password for user [_1] was successfully changed.',''.$user.''));
+ $message = &Apache::lonhtmlcommon::confirm_success(&mt('The password for user [_1] was successfully changed.',''.$user.''));
if ($caller eq 'reset_by_email') {
$r->print($message.'
');
} else {
@@ -1574,13 +1577,18 @@ ENDERROR
}
} else {
# error error: run in circles, scream and shout
- $message = &Apache::lonhtmlcommon::confirm_success(
- &mt("The password for user [_1] was not changed.",''.$user.'').' '.&mt('Please make sure your old password was entered correctly.'),1);
- unless ($caller eq 'reset_by_email') {
+ if ($caller eq 'reset_by_email') {
+ if (!$result) {
+ return 1;
+ } else {
+ return $result;
+ }
+ } else {
+ $message = &Apache::lonhtmlcommon::confirm_success(
+ &mt("The password for user [_1] was not changed.",''.$user.'').' '.&mt('Please make sure your old password was entered correctly.'),1);
$message=&Apache::loncommon::confirmwrapper($message);
&print_main_menu($r, $message);
}
- return 1;
}
return;
}
@@ -1608,7 +1616,7 @@ sub discussionchanger {
}
}
if (defined($userenv{'discmarkread'})) {
- unless ($userenv{'discdisplay'} eq '') {
+ unless ($userenv{'discmarkread'} eq '') {
$discmark = $userenv{'discmarkread'};
}
}
@@ -1652,7 +1660,7 @@ sub discussionchanger {
$currmark = $lt{'ondisp'};
$newmark = 'onmark';
}
-
+
$r->print(<<"END");