From 779861f370d18bad3ad6281e81d374d7e050498d 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 Signed-off-by: Jonathan Druart (cherry picked from commit a508d3fcbec2c1d64b94fe66b288b28cc6998e37) Signed-off-by: Andrew Fuerste-Henry --- 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 0c0be5295b..da4354e751 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.39.5