From 114df119a978ff9d8e8ae2c27b28dbd665469761 Mon Sep 17 00:00:00 2001
From: Nick Clemens <nick@bywatersolutions.com>
Date: Thu, 5 Nov 2020 19:00:32 +0000
Subject: [PATCH] Bug 7607: (follow-up) Disable rather than remove inputs
---
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.11.0