From 607762be48501a5dc8e761fd438baded8abf5672 Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 20 Oct 2010 14:47:32 +0000 Subject: [PATCH] backport r18355 and r18399 for better phone-derived password behavior git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6_1@18401 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/patron/ue.js | 11 +++++------ Open-ILS/xul/staff_client/server/patron/ue_config.js | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/ue.js b/Open-ILS/xul/staff_client/server/patron/ue.js index 650211c4c4..f3ce7d85e0 100644 --- a/Open-ILS/xul/staff_client/server/patron/ue.js +++ b/Open-ILS/xul/staff_client/server/patron/ue.js @@ -291,17 +291,16 @@ function uEditResetPw(pw) { if( (pw = patron.day_phone()) || (pw = patron.evening_phone()) || (pw = patron.other_phone()) ) { pw = pw.substring(pw.length - 4); // this is iffy - uEditResetPw(pw); - appendClear($('ue_password_plain'), text(pw)); - unHideMe($('ue_password_gen')); + appendClear($('ue_password_plain'), text(pw)); + unHideMe($('ue_password_gen')); } } else { pw = uEditMakeRandomPw(patron); } - $('ue_password1').value = pw; - $('ue_password2').value = pw; - $('ue_password1').onchange(); } + $('ue_password1').value = pw; + $('ue_password2').value = pw; + $('ue_password1').onchange(); } diff --git a/Open-ILS/xul/staff_client/server/patron/ue_config.js b/Open-ILS/xul/staff_client/server/patron/ue_config.js index 96ffd42717..e46098982c 100644 --- a/Open-ILS/xul/staff_client/server/patron/ue_config.js +++ b/Open-ILS/xul/staff_client/server/patron/ue_config.js @@ -296,7 +296,7 @@ function uEditDefineData(patron) { type : 'input', regex : phoneRegex, onblur : function() { - if(uEditUsePhonePw) + if(uEditUsePhonePw && patron.isnew()) uEditMakePhonePw(); }, onpostchange: function(field, newval) { @@ -320,7 +320,7 @@ function uEditDefineData(patron) { type : 'input', regex : phoneRegex, onblur : function() { - if(uEditUsePhonePw) + if(uEditUsePhonePw && patron.isnew()) uEditMakePhonePw(); } } @@ -335,7 +335,7 @@ function uEditDefineData(patron) { type : 'input', regex : phoneRegex, onblur : function() { - if(uEditUsePhonePw) + if(uEditUsePhonePw && patron.isnew()) uEditMakePhonePw(); } } -- 2.11.0