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:
Nick Clemens 2017-04-18 14:03:37 -04:00 committed by Kyle M Hall
parent b81a18ea39
commit 185dc7f45a
16 changed files with 16 additions and 16 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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 $patron_image = Koha::Patron::Images->find($data->{borrowernumber});
$template->param( picture => 1 ) if $patron_image;

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 $patron_image = Koha::Patron::Images->find($data->{borrowernumber});
$template->param( picture => 1 ) if $patron_image;

View File

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

View File

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

View File

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