From 18d4658d5cd75421f4d7a389af6ac395b9d28598 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 5 Nov 2020 19:00:32 +0000 Subject: [PATCH] Bug 7607: (follow-up) Disable rather than remove inputs Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Josef Moravec Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index bd253deb25..68f9e88c6b 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -131,15 +131,16 @@ $.fn.selectTabByID = function (tabID) { /* Search results browsing */ /* forms with action leading to search */ $("form[action*='search.pl']").submit(function(){ - var removedPrior = false; + var disabledPrior = false; $(".search_set").each(function(){ - if( removedPrior ){ - $(this).find('select[name="op"]').remove(); - removedPrior = false; + if( disabledPrior ){ + $(this).find('select[name="op"]').prop("disabled","disabled"); + disabledPrior = false; } if( $(this).find('input[name="q"]').val() == "" ){ - $(this).remove(); - removedPrior = true; + $(this).find('input').prop("disabled","disabled"); + $(this).find('select').prop("disabled","disabled"); + disabledPrior = true; } }); resetSearchContext(); -- 2.20.1