TPac: Disable staff hold place submit button by default
authorThomas Berezansky <tsbere@mvlc.org>
Wed, 13 Feb 2013 14:49:49 +0000 (09:49 -0500)
committerBen Shum <bshum@biblio.org>
Wed, 13 Feb 2013 18:23:35 +0000 (13:23 -0500)
Because if we don't have a barcode in the box we shouldn't be submitting.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Open-ILS/web/js/ui/default/opac/staff.js

index 599db8c..0de11fb 100644 (file)
@@ -89,8 +89,9 @@ function staff_hold_usr_barcode_changed(isload) {
         if(!document.getElementById('hold_usr_is_requestor').checked && document.getElementById('hold_usr_input').value) {
             document.getElementById('patron_name').innerHTML = load_info.patron_name;
         }
-        // Ok, now we can allow submitting again
-        document.getElementById('place_hold_submit').disabled = false;
+        // Ok, now we can allow submitting again, unless this is a "true" load, in which case we likely have a blank barcode box active
+        if (isload !== true)
+            document.getElementById('place_hold_submit').disabled = false;
     }
 }
 window.onload = function() {