[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /interface lonpreferences.pm

raeburn raeburn@source.lon-capa.org
Thu, 08 Oct 2009 21:15:19 -0000


raeburn		Thu Oct  8 21:15:19 2009 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface	lonpreferences.pm 
  Log:
  - Backport 1.173.
  
  
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.125.4.5 loncom/interface/lonpreferences.pm:1.125.4.6
--- loncom/interface/lonpreferences.pm:1.125.4.5	Thu Sep 10 16:33:38 2009
+++ loncom/interface/lonpreferences.pm	Thu Oct  8 21:15:19 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.125.4.5 2009/09/10 16:33:38 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 @@
                    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 @@
 <input type="hidden" name="token"   value="$mailtoken" />
 <input type="hidden" name="uname"   value="" />
 <input type="hidden" name="udom"   value="" />
+<input type="hidden" name="email"   value="" />
 
 |;
     }
@@ -1524,14 +1527,17 @@
         }
     } else {
 	# error error: run in circles, scream and shout
-        $message = &Apache::lonhtmlcommon::confirm_success(
-                   &mt("The password for user [_1] was not changed.",'<i>'.$user.'</i>').' '.&mt('Please make sure your old password was entered correctly.'),1);
         if ($caller eq 'reset_by_email') {
-            $r->print($message.'<br />');
+            if (!$result) {
+                return 1;
+            } else {
+                return $result;
+            }
         } else {
+            $message = &Apache::lonhtmlcommon::confirm_success(
+                &mt("The password for user [_1] was not changed.",'<i>'.$user.'</i>').' '.&mt('Please make sure your old password was entered correctly.'),1);
             $r->print(&Apache::loncommon::confirmwrapper($message));
         }
-        return 1;
     }
     return;
 }