From 185dc7f45af17bf70ec36125be736286a1f8b86e 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. Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- 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 4cf9095fb3..4f8ddf04b0 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 0d0ba64e3a..00d21f02e2 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 1d99bcf801..5002c3ea80 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 0b571e6cf9..def6c57d15 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 8150b7ff46..f8a3681f61 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 86c9506229..e69a1ca348 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 b89707ea40..95f533017d 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 1625e32d56..2d9b2ccb76 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 2285bb8089..58d4f6ead3 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 9bf470ee9a..2e25eef2c5 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 20890063bd..9784e88d35 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 c92dbd67bf..4351aae1af 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 252c241432..77f315630d 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 bb4b316fd5..9daf48c314 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 63cc3dab96..c3e6c8d965 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 a59ce7be95..a63d3285b3 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.39.5