From 55e079d02359aed5f1e829c7723e4746525f6ab4 Mon Sep 17 00:00:00 2001 From: MJ Ray Date: Fri, 22 May 2009 14:53:13 +0100 Subject: [PATCH] Add patron card member searching by category code Signed-off-by: Galen Charlton --- .../prog/en/modules/labels/pcard-members-search.tmpl | 9 +++++++++ labels/pcard-member-search.pl | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/pcard-members-search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/pcard-members-search.tmpl index 59bd0d0d5e..1842219974 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/pcard-members-search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/pcard-members-search.tmpl @@ -81,6 +81,15 @@ function add_item3(borrowernumber){ &type=">Z +

+" /> +" /> + + + + +

+

Results to of found for ''

diff --git a/labels/pcard-member-search.pl b/labels/pcard-member-search.pl index 63a4c51422..8f074ff3b5 100755 --- a/labels/pcard-member-search.pl +++ b/labels/pcard-member-search.pl @@ -39,6 +39,7 @@ $debug and warn "[In pcard-member-search] Batch Id: $batch_id, and Type: $batch_ my $quicksearch = $input->param('quicksearch'); my $startfrom = $input->param('startfrom')||1; my $resultsperpage = $input->param('resultsperpage')||C4::Context->preference("PatronsPerPage")||20; +my $category = $input->param('category'); my ($template, $loggedinuser, $cookie); if($quicksearch){ @@ -75,7 +76,7 @@ $orderby = "surname,firstname" unless $orderby; $member =~ s/,//g; #remove any commas from search string $member =~ s/\*/%/g; -unless ($member) { +unless ($member||$category) { $template->param( batch_id => $batch_id, type => $batch_type,); output_html_with_http_headers $input, $cookie, $template->output; exit; @@ -89,7 +90,7 @@ if(length($member) == 1) } else { - ($count,$results)=SearchMember($member,$orderby,"advanced"); + ($count,$results)=SearchMember($member,$orderby,"advanced",$category); } @@ -133,6 +134,7 @@ my $base_url = '&', map { $_->{term} . '=' . $_->{val} } ( { term => 'member', val => $member }, + { term => 'category', val => $category }, { term => 'orderby', val => $orderby }, { term => 'resultsperpage', val => $resultsperpage }, { term => 'type', val => $batch_type }, -- 2.39.5