From: Thomas Berezansky Date: Fri, 13 Apr 2012 17:26:59 +0000 (-0400) Subject: Default email/phone hold pickup in TPac X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=69dc5150c697e525f3c2ff41b3f578e5912e2b16;p=evergreen%2Ftadl.git Default email/phone hold pickup in TPac Like JSPac does, but currently without the check of having phone/email. Signed-off-by: Thomas Berezansky Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 76a88d8594..eaa96227e1 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -625,7 +625,7 @@ sub load_place_hold { }; $ctx->{user_setting_map} = $user_setting_map; - my $default_notify = $$user_setting_map{'opac.hold_notify'} || ''; + my $default_notify = (defined $$user_setting_map{'opac.hold_notify'} ? $$user_setting_map{'opac.hold_notify'} : 'email:phone'); if ($default_notify =~ /email/) { $ctx->{default_email_notify} = 'checked'; } else { diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js index 4d805a5f1b..989f07ce31 100644 --- a/Open-ILS/web/js/ui/default/opac/staff.js +++ b/Open-ILS/web/js/ui/default/opac/staff.js @@ -45,7 +45,7 @@ function staff_hold_usr_barcode_changed(isload) { if(!load_info.settings['opac.default_phone']) load_info.settings['opac.default_phone'] = ''; if(!load_info.settings['opac.default_sms_notify']) load_info.settings['opac.default_sms_notify'] = ''; if(!load_info.settings['opac.default_sms_carrier']) load_info.settings['opac.default_sms_carrier'] = ''; - if(load_info.settings['opac.hold_notify']) { + if(load_info.settings['opac.hold_notify'] || load_info.settings['opac.hold_notify'] === '') { var email = load_info.settings['opac.hold_notify'].indexOf('email') > -1; var phone = load_info.settings['opac.hold_notify'].indexOf('phone') > -1; var sms = load_info.settings['opac.hold_notify'].indexOf('sms') > -1; diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/main/menu.js index c004f05a2f..86e08e104b 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js @@ -2566,6 +2566,7 @@ commands: settings[user.settings()[i].name()] = JSON2js(user.settings()[i].value()); } if(!settings['opac.default_phone'] && user.day_phone()) settings['opac.default_phone'] = user.day_phone(); + if(!settings['opac.hold_notify'] && settings['opac.hold_notify'] !== '') settings['opac.hold_notify'] = 'email:phone'; return {"barcode": barcode, "settings" : settings}; },