[open-ils-commits] [GIT] Evergreen ILS branch master updated. cbd07ddf30a918b2e7fba359c7091a241ed704b6
Evergreen Git
git at git.evergreen-ils.org
Thu Oct 27 13:29:14 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via cbd07ddf30a918b2e7fba359c7091a241ed704b6 (commit)
from 9ea87436847f7335d154bd3ab9a05505ec5812bf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cbd07ddf30a918b2e7fba359c7091a241ed704b6
Author: Jason Etheridge <jason at esilibrary.com>
Date: Fri Oct 14 16:42:20 2011 -0400
LP874597 password from phone # when cloning users
Patron: password from phone # does not work when cloning users
Signed-off-by: Jason Etheridge <jason at esilibrary.com>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
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 cfbefca..33fecd7 100644
--- a/Open-ILS/web/js/ui/default/actor/user/register.js
+++ b/Open-ILS/web/js/ui/default/actor/user/register.js
@@ -921,6 +921,27 @@ function checkCollectionsExemptPerm(cbox) {
);
}
+function usePhonePw(newVal) {
+ var newPw = false;
+ if(this.regExp) {
+ matches = RegExp(this.regExp).exec(newVal);
+ if(matches.length > 1) newPw = matches[1];
+ }
+ if(!newPw && newVal && newVal.length >= 4) {
+ newPw = newVal.substring(newVal.length - 4);
+ }
+ if(newPw) {
+ var p1 = findWidget('au', 'passwd');
+ var p2 = findWidget('au', 'passwd2');
+ if (p1 && p2) {
+ p1.widget.attr('value', newPw);
+ p2.widget.attr('value', newPw);
+ }
+ return newPw;
+ } else {
+ return null;
+ }
+}
function attachWidgetEvents(fmcls, fmfield, widget) {
@@ -1107,24 +1128,10 @@ function attachWidgetEvents(fmcls, fmfield, widget) {
// if configured, use the last four digits of the day phone number as the password
// Alt, use the first capture group of the validator regex
if(uEditUsePhonePw && patron.isnew()) {
- dojo.connect(widget.widget, 'onChange', widget.widget,
- function(newVal) {
- var newPw = false;
- if(this.regExp) {
- matches = RegExp(this.regExp).exec(newVal);
- if(matches.length > 1) newPw = matches[1];
- }
- if(!newPw && newVal && newVal.length >= 4) {
- newPw = newVal.substring(newVal.length - 4);
- }
- if(newPw) {
- var pw1 = findWidget('au', 'passwd').widget;
- var pw2 = findWidget('au', 'passwd2').widget;
- pw1.attr('value', newPw);
- pw2.attr('value', newPw);
- }
- }
- );
+ dojo.connect(widget.widget, 'onChange', widget.widget, usePhonePw);
+ if (patron.day_phone()) {
+ usePhonePw(patron.day_phone());
+ }
}
case 'evening_phone':
case 'other_phone':
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/web/js/ui/default/actor/user/register.js | 43 ++++++++++++---------
1 files changed, 25 insertions(+), 18 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list