--- loncom/interface/lonpreferences.pm 2009/08/13 17:55:44 1.125.4.3 +++ loncom/interface/lonpreferences.pm 2009/10/08 21:15:19 1.125.4.6 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.125.4.3 2009/08/13 17:55:44 raeburn Exp $ +# $Id: lonpreferences.pm,v 1.125.4.6 2009/10/08 21:15:19 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1290,6 +1290,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| @@ -1372,6 +1374,7 @@ sub server_form { + |; } @@ -1516,7 +1519,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 { @@ -1524,14 +1527,17 @@ 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); if ($caller eq 'reset_by_email') { - $r->print($message.'
'); + 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); $r->print(&Apache::loncommon::confirmwrapper($message)); } - return 1; } return; } @@ -1554,7 +1560,7 @@ sub discussionchanger { } } if (defined($userenv{'discmarkread'})) { - unless ($userenv{'discdisplay'} eq '') { + unless ($userenv{'discmarkread'} eq '') { $discmark = $userenv{'discmarkread'}; } } @@ -1644,11 +1650,11 @@ sub verify_and_change_discussion { if (defined($env{'form.discdisp'}) ) { my $newdisp = $env{'form.newdisp'}; if ($newdisp eq 'unread') { - $message .=&mt('In discussions: only new posts will be displayed.').'
'; + $message .= &Apache::lonhtmlcommon::confirm_success(&mt('In discussions: only new posts will be displayed.')).'
'; &Apache::lonnet::put('environment',{'discdisplay' => $newdisp}); &Apache::lonnet::appenv({'environment.discdisplay' => $newdisp}); } else { - $message .= &mt('In discussions: all posts will be displayed.').'
'; + $message .= &Apache::lonhtmlcommon::confirm_success(&mt('In discussions: all posts will be displayed.')).'
'; &Apache::lonnet::del('environment',['discdisplay']); &Apache::lonnet::delenv('environment.discdisplay'); }