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>
This commit is contained in:
parent
c481c15a4f
commit
00b76faf0a
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ if ($countissues > 0 or $flags->{'CHARGES'} or $data->{'borrowernumber'} or $de
|
|||
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'},
|
||||
|
|
|
|||
|
|
@ -119,7 +119,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(),
|
||||
|
|
|
|||
|
|
@ -80,7 +80,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 $patron_image = Koha::Patron::Images->find($data->{borrowernumber});
|
||||
$template->param( picture => 1 ) if $patron_image;
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,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 $patron_image = Koha::Patron::Images->find($data->{borrowernumber});
|
||||
$template->param( picture => 1 ) if $patron_image;
|
||||
|
||||
|
|
|
|||
|
|
@ -166,7 +166,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 $patron_image = Koha::Patron::Images->find($bor->{borrowernumber});
|
||||
$template->param( picture => 1 ) if $patron_image;
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,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 $patron_image = Koha::Patron::Images->find($bor->{borrowernumber});
|
||||
$template->param( picture => 1 ) if $patron_image;
|
||||
|
|
|
|||
|
|
@ -74,7 +74,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,
|
||||
|
|
|
|||
|
|
@ -223,7 +223,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -173,7 +173,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -103,7 +103,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';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,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' );
|
||||
}
|
||||
|
||||
##################################################################################
|
||||
|
|
|
|||
|
|
@ -99,7 +99,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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue