From: Thomas Berezansky Date: Fri, 16 Mar 2012 18:46:19 +0000 (-0400) Subject: TPac: Include day phone default_phone backup X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8873e420306e317639ff413d1954a5ea7c0d1a74;p=contrib%2FConifer.git TPac: Include day phone default_phone backup Like JSPac. Signed-off-by: Thomas Berezansky Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/templates/opac/parts/place_hold.tt2 b/Open-ILS/src/templates/opac/parts/place_hold.tt2 index dca48f2f1f..71c9bdea42 100644 --- a/Open-ILS/src/templates/opac/parts/place_hold.tt2 +++ b/Open-ILS/src/templates/opac/parts/place_hold.tt2 @@ -82,7 +82,8 @@ [% l('Yes, by Phone') %]
[% l('Phone Number:') %] + IF ctx.user_setting_map.$setting; %] value='[% ctx.user_setting_map.$setting | html %]' + [%- ELSIF ctx.user.day_phone; %] value='[% ctx.user.day_phone | html %]' [% END %]/>
[% IF ctx.get_org_setting(ctx.search_ou, 'sms.enable') == 1 %] -1; var phone = load_info.settings['opac.hold_notify'].indexOf('phone') > -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 c6d9755ee2..4ca96d828a 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js @@ -2530,7 +2530,7 @@ commands: return "user_false"; }, - 'get_barcode_and_settings' : function(window, barcode, settings, settings_only) { + 'get_barcode_and_settings' : function(window, barcode, settings_only) { JSAN.use('util.network'); if(!settings_only) { // We need to double-check the barcode for completion and such. @@ -2546,10 +2546,14 @@ commands: var network = new util.network(); // We have a barcode! Time to load settings. // First, we need the user ID - var user_id = network.simple_request('FM_AU_ID_RETRIEVE_VIA_BARCODE_OR_USERNAME', [ ses(), barcode ]); - if(user_id.ilsevent != undefined || user_id.textcode != undefined) + var user = network.simple_request('FM_AU_RETRIEVE_VIA_BARCODE', [ ses(), barcode ]); + if(user.ilsevent != undefined || user.textcode != undefined) return false; - var settings = network.simple_request('FM_AUS_RETRIEVE', [ ses(), user_id, settings ]); + var settings = {}; + for(var i = 0; i < user.settings().length; i++) { + 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(); return {"barcode": barcode, "settings" : settings}; }, diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js index d3a45879f3..7100484614 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.js +++ b/Open-ILS/xul/staff_client/server/patron/display.js @@ -392,7 +392,7 @@ patron.display.prototype = { {}, { 'get_barcode' : function(a,b,c) { return xulG.get_barcode(a,b,c); }, - 'get_barcode_and_settings' : function(a,b,c,d) { return xulG.get_barcode_and_settings(a,b,c,d); } + 'get_barcode_and_settings' : function(a,b,c) { return xulG.get_barcode_and_settings(a,b,c); } } ); }