From: phasefx Date: Tue, 23 Dec 2008 22:22:36 +0000 (+0000) Subject: another entry point for verify credentials, via patron sidebar. also disable some... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1d5b29603fe63092094432e41223d335a93a77a8;p=Evergreen.git another entry point for verify credentials, via patron sidebar. also disable some of the interface if thus invoked git-svn-id: svn://svn.open-ils.org/ILS/trunk@11678 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/main/verify_credentials.js b/Open-ILS/xul/staff_client/server/main/verify_credentials.js index fd04fca8e3..e11a41e28d 100644 --- a/Open-ILS/xul/staff_client/server/main/verify_credentials.js +++ b/Open-ILS/xul/staff_client/server/main/verify_credentials.js @@ -69,7 +69,11 @@ function verify_init() { } catch(E) { alert(E); } - document.getElementById('name_prompt').focus(); + if (document.getElementById('name_prompt').disabled) { + document.getElementById('password_prompt').focus(); + } else { + document.getElementById('name_prompt').focus(); + } }, false ); @@ -97,7 +101,16 @@ function verify_init() { false ); - document.getElementById('name_prompt').focus(); + if (xulG.barcode) { + document.getElementById('name_prompt').disabled = true; + document.getElementById('name_prompt').value = xulG.usrname; + document.getElementById('barcode_prompt').disabled = true; + document.getElementById('barcode_prompt').value = xulG.barcode; + document.getElementById('cmd_retrieve').setAttribute('disabled','true'); + document.getElementById('password_prompt').focus(); + } else { + document.getElementById('name_prompt').focus(); + } } catch(E) { alert(E); diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js index e1913cdbfb..36dc4ce4f4 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.js +++ b/Open-ILS/xul/staff_client/server/patron/display.js @@ -365,7 +365,17 @@ patron.display.prototype = { {}, { 'barcode' : obj.barcode, - 'id' : obj.id, + 'id' : obj.id, + 'verify_credentials' : function(patron) { + var vframe = obj.right_deck.reset_iframe( + urls.XUL_VERIFY_CREDENTIALS, + {}, + { + 'barcode' : patron.card().barcode(), + 'usrname' : patron.usrname() + } + ); + }, 'on_finished' : function(patron) { obj.patron = patron; obj.controller.render(); diff --git a/Open-ILS/xul/staff_client/server/patron/summary.js b/Open-ILS/xul/staff_client/server/patron/summary.js index 3abfc26cd7..43f8972591 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary.js +++ b/Open-ILS/xul/staff_client/server/patron/summary.js @@ -35,6 +35,12 @@ patron.summary.prototype = { ['command'], function() { alert($("commonStrings").getString('common.unimplemented')); } ], + 'cmd_verify_credentials' : [ + ['command'], + function() { + xulG.verify_credentials(obj.patron); + } + ], 'patron_alert' : [ ['render'], function(e) { diff --git a/Open-ILS/xul/staff_client/server/patron/summary.xul b/Open-ILS/xul/staff_client/server/patron/summary.xul index 24a79234ae..f5c9101cd6 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary.xul +++ b/Open-ILS/xul/staff_client/server/patron/summary.xul @@ -70,6 +70,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul b/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul index 2a2f8c688e..1a0d71c5df 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul @@ -137,8 +137,13 @@ + +