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 <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 00b76faf0a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
Nick Clemens 2017-04-18 14:03:37 -04:00 committed by Julian Maurice
parent aa33ca6825
commit 306a0fceb9
15 changed files with 15 additions and 15 deletions

View File

@ -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;

View File

@ -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'},

View File

@ -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(),

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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,

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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';
}

View File

@ -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' );
}
##################################################################################

View File

@ -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,