From ad4ec5958a1a17def4405dc6cce737e92a853009 Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Tue, 8 Oct 2019 16:00:12 -0700 Subject: [PATCH] LP#1847343: fix Exclude Electronic Resources checkbox when locale picker is enabled Signed-off-by: Jeff Davis Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/opac/simple.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Open-ILS/web/js/ui/default/opac/simple.js b/Open-ILS/web/js/ui/default/opac/simple.js index e121fd188f..abf50c7da1 100644 --- a/Open-ILS/web/js/ui/default/opac/simple.js +++ b/Open-ILS/web/js/ui/default/opac/simple.js @@ -108,11 +108,9 @@ function exclude_onchange(checkbox) { var reg = /-search_format\(electronic\)/g; search_box.value = search_box.value.replace(reg, ""); // Remove from the search form itself - var search_format_inputs = document.getElementsByName("fi:-search_format"); + var search_format_inputs = document.querySelectorAll('input[type="hidden"][name="fi:-search_format"][value="electronic"]'); for (var j = 0; j < search_format_inputs.length; j++) { - if (search_format_inputs[j].value == 'electronic') { - search_format_inputs[j].parentNode.removeChild(search_format_inputs[j]); - } + search_format_inputs[j].parentNode.removeChild(search_format_inputs[j]); } } -- 2.11.0