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:
parent
aa33ca6825
commit
306a0fceb9
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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'},
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
}
|
||||
|
||||
##################################################################################
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue