diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt index 2d941ba168..9509ead702 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt @@ -298,6 +298,33 @@ } } } + + + function checkBarcodeInput() { + var inputField = document.getElementById("barcode_input"); + var button = document.getElementById("sci_append_button"); + + if (inputField.value.trim() === "") { + button.disabled = true; + } else { + button.disabled = false; + } + } + +checkBarcodeInput(); + +document.getElementById("barcode_input").addEventListener("input", checkBarcodeInput); + +document.getElementById("sci_append_button").addEventListener("click", function() { + setTimeout(checkBarcodeInput, 10); +}); + + + + + + + [% IF ( Koha.Preference('SelfCheckInUserJS') ) %]