[open-ils-commits] r17919 - branches/rel_1_6_0/Open-ILS/xul/staff_client/server/patron (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Sep 23 11:30:45 EDT 2010
Author: miker
Date: 2010-09-23 11:30:43 -0400 (Thu, 23 Sep 2010)
New Revision: 17919
Modified:
branches/rel_1_6_0/Open-ILS/xul/staff_client/server/patron/ue.js
Log:
Patch from Steve Callendar, via James Fournie, via launchpad:
When the patron.password.use_phone is set, new patrons are created with their password set to the last 4 digits of their phone number, HOWEVER, when a patron's password is reset, it does not work properly. Although the little underlined summary shows the proper 4 digits, the password box displays 9-ish digits, and is not the last 4 digits of the password.
The attached patch was created by Steve Callender and is confirmed working on 1.6.0
This patch will not work on 2.0 as that has a new user editor, but it would presumably be worthwhile to verify this functionality works in that editor as well.
Modified: branches/rel_1_6_0/Open-ILS/xul/staff_client/server/patron/ue.js
===================================================================
--- branches/rel_1_6_0/Open-ILS/xul/staff_client/server/patron/ue.js 2010-09-23 15:22:29 UTC (rev 17918)
+++ branches/rel_1_6_0/Open-ILS/xul/staff_client/server/patron/ue.js 2010-09-23 15:30:43 UTC (rev 17919)
@@ -285,13 +285,26 @@
}
}
-function uEditResetPw(pw) {
- if(!pw) pw = uEditMakeRandomPw(patron);
- $('ue_password1').value = pw;
- $('ue_password2').value = pw;
- $('ue_password1').onchange();
+function uEditResetPw(pw) {
+ if(!pw) {
+ if(uEditUsePhonePw) {
+ 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'));
+ }
+ } else {
+ pw = uEditMakeRandomPw(patron);
+ }
+ $('ue_password1').value = pw;
+ $('ue_password2').value = pw;
+ $('ue_password1').onchange();
+ }
}
+
function uEditClone(clone) {
var cloneUser = fetchFleshedUser(clone);
More information about the open-ils-commits
mailing list