From 2e0c1e6654fba13ce421109115303d9cbd4cc59d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 14 Apr 2015 12:05:45 +0200 Subject: [PATCH] [PASSED QA] Bug 7380: Rename filter to avoid confusion The branchcode and categorycode parameter names are too common and are confusing. To remove the ambiguity, this patch renames them with branchcode_filter and categorycode_filter. Test plan: 1/ Go on the patron home page (members-home.pl) 2/ Fill the library and category dropdown list in the header search 3/ The patron result list appears and the filters (on the right) are correctly set with what you have selected. Make sure the ones in the header are also correctly selected. 4/ Click on a patron 5/ On the patron detail page (moremember.pl), the dropdown lists in the header are not preselected. Signed-off-by: Nicole Engard Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 8 ++++---- koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 8 ++++---- members/member.pl | 9 ++------- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index 7723e3a..05a0e98 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -75,8 +75,8 @@

- [% SET branches = Branches.all( selected => branchcode ) %] - [% IF branches.size != 1 %] [% END %] @@ -92,8 +92,8 @@

- [% SET categories = Categories.all( selected => categorycode ) %] - [% FOREACH categorie IN categories %] [% IF ( categorie.selected ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt index cd2608b..aac6657 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -98,10 +98,10 @@ $(document).ready(function() { $("#searchtype_filter").val("[% searchtype %]"); [% END %] [% IF categorycode %] - $("#categorycode_filter").val("[% categorycode %]"); + $("#categorycode_filter").val("[% categorycode_filter %]"); [% END %] [% IF branchcode %] - $("#branchcode_filter").val("[% branchcode %]"); + $("#branchcode_filter").val("[% branchcode_filter %]"); [% END %] [% IF view != "show_results" %] @@ -454,7 +454,7 @@ function filterByFirstLetterSurname(letter) {

  • - [% SET categories = Categories.all( selected => categorycode ) %] + [% SET categories = Categories.all( selected => categorycode_filter ) %] [% IF branches.size != 1 %] diff --git a/members/member.pl b/members/member.pl index 03fcc8f..b80cd73 100755 --- a/members/member.pl +++ b/members/member.pl @@ -45,11 +45,6 @@ my ($template, $loggedinuser, $cookie) my $theme = $input->param('theme') || "default"; -my $patron = $input->Vars; -foreach (keys %$patron){ - delete $patron->{$_} unless($patron->{$_}); -} - my $searchmember = $input->param('searchmember'); my $quicksearch = $input->param('quicksearch') // 0; @@ -82,8 +77,8 @@ my $view = $input->request_method() eq "GET" ? "show_form" : "show_results"; $template->param( patron_lists => [ GetPatronLists() ], searchmember => $searchmember, - branchcode => $patron->{branchcode}, - categorycode => $patron->{categorycode}, + branchcode_filter => $input->param('branchcode_filter'), + categorycode_filter => $input->param('categorycode_filter'), searchtype => $input->param('searchtype') || 'start_with', searchfieldstype => $searchfieldstype, PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20, -- 1.7.10.4