From 83da81e0ce2116bbcfd6581a58e3f50dbbfcc3f1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 4 Jun 2015 16:28:08 +0200 Subject: [PATCH] Bug 14029: Provide 'clear' link to empty reports search filters MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch adds a 'clear' link next to the 'Apply filters' button to empty out the form fields. To test: - go to the reports module - make sure you have some saved reports - search your saved reports using the author, keyword and date filters - verify searching works as expected - verify the new 'clear' link works as expected Tested couner patch, followed test plan, works as expected. QA tools ok. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/reports/guided_reports_start.tt | 5 ++++- reports/guided_reports.pl | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index e769af2a5c..283a1cf6ef 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -1045,7 +1045,10 @@ Sub report: -
+
+ + Clear +
[% END %] diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index 0fb773f7f3..9cfa8ce9fe 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -77,7 +77,7 @@ if ( $input->param("filter_set") ) { $session->param('report_filter', $filter) if $session; $template->param( 'filter_set' => 1 ); } -elsif ($session) { +elsif ($session and not $input->param('clear_filters')) { $filter = $session->param('report_filter'); } -- 2.20.1