From cef1bd1c4054bffe5938b0da1405ef5107743b84 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 3 Nov 2020 11:19:23 +0000 Subject: [PATCH] Bug 7607: [Alternate] Remove empty inputs when submitting search form This patch surrounds the operator, index, and query fields on the advanced search page wtih a 'search_set' class. This allows us to process them as a group and confirm the query is populated before submitting the other parts to the form TO test: 1 - Go to advanced search 2 - Use search boxes to search like: Title: (leave blank) Author: clinton keyword: shuffle 3 - Perform search 4 - Note no results as you searched for title:clinton etc. 5 - apply patch 6 - refresh and repeat 7 - search is now correct 8 - Try vaeious searches with 'more options' and selecting different operators Signed-off-by: David Nind Signed-off-by: David Cook https://bugs.koha-community.org/show_bug.cgi?id=7606 --- .../intranet-tmpl/prog/en/modules/catalogue/advsearch.tt | 6 +++++- koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt index 673aa2d7c9..11b84e53bb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt @@ -94,7 +94,11 @@
Search for [% FOREACH search_box IN search_boxes_loop %] - [% IF ( search_boxes_label ) %]
[% ELSE %]
[% END %] + [% IF ( search_boxes_label ) %] +
+ [% ELSE %] +
+ [% END %] [% IF ( expanded_options ) %] [% IF ( search_box.boolean ) %]