From: phasefx Date: Wed, 9 Jun 2010 20:06:25 +0000 (+0000) Subject: In the patron editor, ensure that the Verify Password field matches the Password... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0f70b40ac5bf771034e14f75279cd0faf371c55e;p=evergreen%2Ftadl.git In the patron editor, ensure that the Verify Password field matches the Password field to validate git-svn-id: svn://svn.open-ils.org/ILS/trunk@16639 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js index 32876b7109..31317782ec 100644 --- a/Open-ILS/web/js/ui/default/actor/user/register.js +++ b/Open-ILS/web/js/ui/default/actor/user/register.js @@ -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; } }