if the staff client provides the OPAC with a patron's barcode, bypass the barcode...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 24 Feb 2009 17:16:20 +0000 (17:16 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 24 Feb 2009 17:16:20 +0000 (17:16 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12281 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/holds.js

index 92afad0..0a7370c 100644 (file)
@@ -12,6 +12,10 @@ var noEmailMessage;
 var noEmailMessageXUL;
 
 function holdsHandleStaff() {
+
+    // if we know the recipient's barcode, use it
+    if(xulG.patron_barcode) return _holdsHandleStaff();
+
        swapCanvas($('xulholds_box'));
        $('xul_recipient_barcode').focus();
        $('xul_recipient_barcode').onkeypress = function(evt) 
@@ -38,7 +42,7 @@ function _holdsHandleStaffMe() {
 }
 
 function _holdsHandleStaff() {
-       var barcode = $('xul_recipient_barcode').value;
+       var barcode = xulG.patron_barcode || $('xul_recipient_barcode').value;
        var user = grabUserByBarcode( G.user.session, barcode );
 
        var evt;