From 306a0fceb9a1d5fe24adc15365863474cfbb6cee 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 (cherry picked from commit 00b76faf0ac30601fb3ff12a6cd71bcdab1b7177) Signed-off-by: Julian Maurice --- members/boraccount.pl | 2 +- members/deletemem.pl | 2 +- members/files.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 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/members/boraccount.pl b/members/boraccount.pl index 808305a2f6..6cdb362d6a 100755 --- a/members/boraccount.pl +++ b/members/boraccount.pl @@ -91,7 +91,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 ($picture, $dberror) = GetPatronImage($data->{'borrowernumber'}); $template->param( picture => 1 ) if $picture; diff --git a/members/deletemem.pl b/members/deletemem.pl index c44c86fbc4..c828f6ee66 100755 --- a/members/deletemem.pl +++ b/members/deletemem.pl @@ -110,7 +110,7 @@ if ($countissues > 0 or $flags->{'CHARGES'} or $data->{'borrowernumber'} or $de my ($picture, $dberror) = GetPatronImage($bor->{'borrowernumber'}); $template->param( picture => 1 ) if $picture; - $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 27d102d52f..39e6f06e4f 100755 --- a/members/files.pl +++ b/members/files.pl @@ -118,7 +118,7 @@ else { my ($picture, $dberror) = GetPatronImage($data->{'borrowernumber'}); $template->param( picture => 1 ) if $picture; - $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::Borrower::Files->new( borrowernumber => $borrowernumber ) ->GetFilesInfo(), diff --git a/members/mancredit.pl b/members/mancredit.pl index 9d69f90e85..e1d3799ef5 100755 --- a/members/mancredit.pl +++ b/members/mancredit.pl @@ -79,7 +79,7 @@ if ($add){ $template->param( 'catcode' => $catcodes->[0]) if $cnt == 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 ($picture, $dberror) = GetPatronImage($data->{'borrowernumber'}); $template->param( picture => 1 ) if $picture; diff --git a/members/maninvoice.pl b/members/maninvoice.pl index 9469cc6fd9..6ce7b5b7b2 100755 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -105,7 +105,7 @@ if ($add){ $template->param( 'catcode' => $catcodes->[0]) if $cnt == 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 ($picture, $dberror) = GetPatronImage($data->{'borrowernumber'}); $template->param( picture => 1 ) if $picture; diff --git a/members/member-flags.pl b/members/member-flags.pl index 1b9d39fb24..2b79f14705 100755 --- a/members/member-flags.pl +++ b/members/member-flags.pl @@ -156,7 +156,7 @@ if ($input->param('newflags')) { $template->param( 'catcode' => $catcodes->[0]) if $cnt == 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 ($picture, $dberror) = GetPatronImage($bor->{'borrowernumber'}); $template->param( picture => 1 ) if $picture; diff --git a/members/member-password.pl b/members/member-password.pl index 995797ddd9..f51b0076eb 100755 --- a/members/member-password.pl +++ b/members/member-password.pl @@ -98,7 +98,7 @@ if ( $bor->{'category_type'} eq 'C' ) { $template->param( 'catcode' => $catcodes->[0] ) if $cnt == 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 ( $picture, $dberror ) = GetPatronImage( $bor->{'borrowernumber'} ); $template->param( picture => 1 ) if $picture; diff --git a/members/notices.pl b/members/notices.pl index 79760ec7eb..e87b5090b2 100755 --- a/members/notices.pl +++ b/members/notices.pl @@ -61,7 +61,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 6c4dbe8dc7..cfab7f5105 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -222,7 +222,7 @@ sub borrower_add_additional_fields { $b_ref->{catcode} = $catcodes->[0]; } } - } 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 3e1c99ae19..7e0e391893 100755 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -172,7 +172,7 @@ sub borrower_add_additional_fields { $b_ref->{catcode} = $catcodes->[0]; } } - } 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 5b91985445..905139037d 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 ($picture, $dberror) = GetPatronImage($data->{'borrowernumber'}); $template->param( picture => 1 ) if $picture; diff --git a/members/printinvoice.pl b/members/printinvoice.pl index 9a5c5b9918..10d4244627 100755 --- a/members/printinvoice.pl +++ b/members/printinvoice.pl @@ -111,7 +111,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 ( $picture, $dberror ) = GetPatronImage( $data->{'borrowernumber'} ); $template->param( picture => 1 ) if $picture; diff --git a/members/readingrec.pl b/members/readingrec.pl index 556299bd78..bde83fa6ab 100755 --- a/members/readingrec.pl +++ b/members/readingrec.pl @@ -99,7 +99,7 @@ if ( $data->{'category_type'} eq 'C') { $template->param( 'catcode' => $catcodes->[0]) if $cnt == 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 3b8e3fabf0..d9fb3a8fb9 100755 --- a/members/routing-lists.pl +++ b/members/routing-lists.pl @@ -82,7 +82,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 fd754c0fe9..e433f8cfa5 100755 --- a/members/statistics.pl +++ b/members/statistics.pl @@ -98,7 +98,7 @@ $template->param( picture => 1 ) if $picture; $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