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> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
b81a18ea39
commit
185dc7f45a
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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'},
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
}
|
||||
|
||||
##################################################################################
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue