In the patron editor, ensure that the Verify Password field matches the Password...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 9 Jun 2010 20:06:25 +0000 (20:06 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 9 Jun 2010 20:06:25 +0000 (20:06 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16639 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/actor/user/register.js

index 32876b7..3131778 100644 (file)
@@ -742,6 +742,18 @@ function attachWidgetEvents(fmcls, fmfield, widget) {
                 );
                 return;
 
+            case 'passwd':
+                dojo.connect(widget.widget, 'onChange',
+                    function(newVal) {
+                        var pw1 = findWidget('au', 'passwd').widget;
+                        var pw2 = findWidget('au', 'passwd2').widget;
+                        var preserved_value = pw2.attr('value');
+                        // Ensure that the pw2 field match the pw1 field to validate
+                        pw2.regExp = newVal.replace(/([.\\^$*+?\(\)\[\]\{\}])/g, '\\$1');
+                        pw2.reset();
+                        ps2.attr(preserved_value);
+                    });
+                return;
         }
     }