From 1d9dc042da0ed9c16431b6334ead500d57092bd3 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 18 Apr 2017 14:03:37 -0400 Subject: [PATCH] Bug 18423 - Followup - enable Add child button for institutional borrowers If they can have guarantors and we shwo the button on one page I think we should in fact show it on all. --- members/boraccount.pl | 2 +- members/deletemem.pl | 2 +- members/files.pl | 2 +- members/housebound.pl | 2 +- members/mancredit.pl | 2 +- members/maninvoice.pl | 2 +- members/member-flags.pl | 2 +- members/member-password.pl | 2 +- members/notices.pl | 2 +- members/pay.pl | 2 +- members/paycollect.pl | 2 +- members/printfeercpt.pl | 2 +- members/printinvoice.pl | 2 +- members/readingrec.pl | 2 +- members/routing-lists.pl | 2 +- members/statistics.pl | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/members/boraccount.pl b/members/boraccount.pl index 4cf9095..4f8ddf0 100755 --- a/members/boraccount.pl +++ b/members/boraccount.pl @@ -92,7 +92,7 @@ foreach my $accountline ( @{$accts}) { } } -$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); +$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' || $data->{'category_type'} eq 'I' ); my $patron_image = Koha::Patron::Images->find($data->{borrowernumber}); $template->param( picture => 1 ) if $patron_image; diff --git a/members/deletemem.pl b/members/deletemem.pl index 0d0ba64..00d21f0 100755 --- a/members/deletemem.pl +++ b/members/deletemem.pl @@ -110,7 +110,7 @@ if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'} or $is_ my $patron_image = Koha::Patron::Images->find($bor->{borrowernumber}); $template->param( picture => 1 ) if $patron_image; - $template->param( adultborrower => 1 ) if ( $bor->{category_type} eq 'A' ); + $template->param( adultborrower => 1 ) if ( $bor->{category_type} eq 'A' || $bor->{category_type} eq 'I' ); $template->param(borrowernumber => $member, surname => $bor->{'surname'}, diff --git a/members/files.pl b/members/files.pl index 1d99bcf..5002c3e 100755 --- a/members/files.pl +++ b/members/files.pl @@ -117,7 +117,7 @@ else { my $patron_image = Koha::Patron::Images->find($data->{borrowernumber}); $template->param( picture => 1 ) if $patron_image; - $template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' ); + $template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' || $data->{category_type} eq 'I' ); $template->param( files => Koha::Patron::Files->new( borrowernumber => $borrowernumber ) ->GetFilesInfo(), diff --git a/members/housebound.pl b/members/housebound.pl index 0b571e6..def6c57 100755 --- a/members/housebound.pl +++ b/members/housebound.pl @@ -171,7 +171,7 @@ if ( C4::Context->preference('ExtendedPatronAttributes') and $patron ) { ); } -$template->param( adultborrower => 1 ) if ( $category->category_type eq 'A' ); +$template->param( adultborrower => 1 ) if ( $category->category_type eq 'A' || $category->category_type eq 'I' ); $template->param( picture => $patron_image, housebound_profile => $houseboundprofile, diff --git a/members/mancredit.pl b/members/mancredit.pl index 8150b7f..f8a3681 100755 --- a/members/mancredit.pl +++ b/members/mancredit.pl @@ -80,7 +80,7 @@ if ($add){ $template->param( 'catcode' => $patron_categories->next ) if $patron_categories->count == 1; } - $template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' ); + $template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' || $data->{category_type} eq 'I' ); my $patron_image = Koha::Patron::Images->find($data->{borrowernumber}); $template->param( picture => 1 ) if $patron_image; diff --git a/members/maninvoice.pl b/members/maninvoice.pl index 86c9506..e69a1ca 100755 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -106,7 +106,7 @@ if ($add){ $template->param( 'catcode' => $patron_categories->next ) if $patron_categories->count == 1; } - $template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); + $template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' || $data->{'category_type'} eq 'I' ); my $patron_image = Koha::Patron::Images->find($data->{borrowernumber}); $template->param( picture => 1 ) if $patron_image; diff --git a/members/member-flags.pl b/members/member-flags.pl index b89707e..95f5330 100755 --- a/members/member-flags.pl +++ b/members/member-flags.pl @@ -176,7 +176,7 @@ if ($input->param('newflags')) { $template->param( 'catcode' => $patron_categories->next ) if $patron_categories->count == 1; } -$template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' ); +$template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' || $bor->{'category_type'} eq 'I' ); my $patron_image = Koha::Patron::Images->find($bor->{borrowernumber}); $template->param( picture => 1 ) if $patron_image; diff --git a/members/member-password.pl b/members/member-password.pl index 1625e32..2d9b2cc 100755 --- a/members/member-password.pl +++ b/members/member-password.pl @@ -105,7 +105,7 @@ if ( $bor->{'category_type'} eq 'C') { $template->param( 'catcode' => $patron_categories->next ) if $patron_categories->count == 1; } -$template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' ); +$template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' || $bor->{'category_type'} eq 'I' ); my $patron_image = Koha::Patron::Images->find($bor->{borrowernumber}); $template->param( picture => 1 ) if $patron_image; diff --git a/members/notices.pl b/members/notices.pl index 2285bb8..58d4f6e 100755 --- a/members/notices.pl +++ b/members/notices.pl @@ -73,7 +73,7 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { } $template->param(%$borrower); -$template->param( adultborrower => 1 ) if ( $borrower->{category_type} eq 'A' ); +$template->param( adultborrower => 1 ) if ( $borrower->{category_type} eq 'A' || $borrower->{category_type} eq 'I' ); $template->param( QUEUED_MESSAGES => $queued_messages, borrowernumber => $borrowernumber, diff --git a/members/pay.pl b/members/pay.pl index 9bf470e..2e25eef 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -231,7 +231,7 @@ sub borrower_add_additional_fields { my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']}); $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1; $template->param( 'catcode' => $patron_categories->next ) if $patron_categories->count == 1; - } elsif ( $b_ref->{category_type} eq 'A' ) { + } elsif ( $b_ref->{category_type} eq 'A' || $b_ref->{category_type} eq 'I' ) { $b_ref->{adultborrower} = 1; } diff --git a/members/paycollect.pl b/members/paycollect.pl index 2089006..9784e88 100755 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -191,7 +191,7 @@ sub borrower_add_additional_fields { my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']}); $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1; $template->param( 'catcode' => $patron_categories->next ) if $patron_categories->count == 1; - } elsif ( $b_ref->{category_type} eq 'A' ) { + } elsif ( $b_ref->{category_type} eq 'A' || $b_ref->{category_type} eq 'I' ) { $b_ref->{adultborrower} = 1; } diff --git a/members/printfeercpt.pl b/members/printfeercpt.pl index c92dbd6..4351aae 100755 --- a/members/printfeercpt.pl +++ b/members/printfeercpt.pl @@ -112,7 +112,7 @@ for (my $i=0;$i<$numaccts;$i++){ push(@accountrows, \%row); } -$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); +$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' || $data->{'category_type'} eq 'I' ); my $patron_image = Koha::Patron::Images->find($data->{borrowernumber}); $template->param( picture => 1 ) if $patron_image; diff --git a/members/printinvoice.pl b/members/printinvoice.pl index 252c241..77f3156 100755 --- a/members/printinvoice.pl +++ b/members/printinvoice.pl @@ -112,7 +112,7 @@ for ( my $i = 0 ; $i < $numaccts ; $i++ ) { push( @accountrows, \%row ); } -$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); +$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' || $data->{'category_type'} eq 'I' ); my $patron_image = Koha::Patron::Images->find($data->{borrowernumber}); $template->param( picture => 1 ) if $patron_image; diff --git a/members/readingrec.pl b/members/readingrec.pl index bb4b316..9daf48c 100755 --- a/members/readingrec.pl +++ b/members/readingrec.pl @@ -101,7 +101,7 @@ if ( $data->{'category_type'} eq 'C') { $template->param( 'catcode' => $patron_categories->next ) if $patron_categories->count == 1; } -$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); +$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' || $data->{'category_type'} eq 'I' ); if (! $limit){ $limit = 'full'; } diff --git a/members/routing-lists.pl b/members/routing-lists.pl index 63cc3da..c3e6c8d 100755 --- a/members/routing-lists.pl +++ b/members/routing-lists.pl @@ -80,7 +80,7 @@ if ($borrowernumber) { routinglistview => 1 ); - $template->param( adultborrower => 1 ) if ( $borrower->{'category_type'} eq 'A' ); + $template->param( adultborrower => 1 ) if ( $borrower->{'category_type'} eq 'A' || $borrower->{'category_type'} eq 'I' ); } ################################################################################## diff --git a/members/statistics.pl b/members/statistics.pl index a59ce7b..a63d328 100755 --- a/members/statistics.pl +++ b/members/statistics.pl @@ -97,7 +97,7 @@ $template->param( picture => 1 ) if $patron_image; $template->param(%$borrower); -$template->param( adultborrower => 1 ) if ( $borrower->{category_type} eq 'A' ); +$template->param( adultborrower => 1 ) if ( $borrower->{category_type} eq 'A' || $borrower->{category_type} eq 'I' ); $template->param( statisticsview => 1, -- 2.1.4