Passing "adultborrower" variable to the template so that "Add Child" button can be displayed in the toolbar when appropriate. Fixes Bug 1510.
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
bf413a98c9
commit
f46ebf69a0
|
|
@ -620,6 +620,10 @@ if ( C4::Context->preference("memberofinstitution") ) {
|
|||
|
||||
$amountold = $temp[1];
|
||||
|
||||
my $borrowercategory = GetBorrowercategory( $borrower->{'categorycode'} );
|
||||
my $category_type = $borrowercategory->{'category_type'};
|
||||
( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' );
|
||||
|
||||
$template->param(
|
||||
issued_itemtypes_count_loop => $issued_itemtypes_loop,
|
||||
findborrower => $findborrower,
|
||||
|
|
@ -651,6 +655,7 @@ $template->param(
|
|||
inprocess => $inprocess,
|
||||
memberofinstution => $member_of_institution,
|
||||
CGIorganisations => $CGIorganisations,
|
||||
|
||||
);
|
||||
|
||||
# set return date if stickyduedate
|
||||
|
|
|
|||
|
|
@ -86,6 +86,10 @@ for (my $i=0;$i<$numaccts;$i++){
|
|||
push(@accountrows, \%row);
|
||||
}
|
||||
|
||||
my $borrowercategory = GetBorrowercategory( $data->{'categorycode'} );
|
||||
my $category_type = $borrowercategory->{'category_type'};
|
||||
( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' );
|
||||
|
||||
$template->param(
|
||||
finesview => 1,
|
||||
firstname => $data->{'firstname'},
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@ if ($add){
|
|||
manualinvoice($borrowernumber,$itemnum,$desc,$type,$amount);
|
||||
print $input->redirect("/cgi-bin/koha/members/boraccount.pl?borrowernumber=$borrowernumber");
|
||||
} else {
|
||||
|
||||
|
||||
|
||||
my ($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "members/mancredit.tmpl",
|
||||
query => $input,
|
||||
|
|
@ -53,6 +56,11 @@ if ($add){
|
|||
flagsrequired => {borrowers => 1},
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
my $borrowercategory = GetBorrowercategory( $data->{'categorycode'} );
|
||||
my $category_type = $borrowercategory->{'category_type'};
|
||||
( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' );
|
||||
|
||||
$template->param(
|
||||
borrowernumber => $borrowernumber,
|
||||
firstname => $data->{'firstname'},
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ if ($add){
|
|||
exit;
|
||||
}
|
||||
} else {
|
||||
|
||||
my ($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "members/maninvoice.tmpl",
|
||||
query => $input,
|
||||
|
|
@ -73,6 +74,11 @@ if ($add){
|
|||
flagsrequired => {borrowers => 1},
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
my $borrowercategory = GetBorrowercategory( $data->{'categorycode'} );
|
||||
my $category_type = $borrowercategory->{'category_type'};
|
||||
( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' );
|
||||
|
||||
$template->param(
|
||||
borrowernumber => $borrowernumber,
|
||||
firstname => $data->{'firstname'},
|
||||
|
|
|
|||
|
|
@ -68,6 +68,10 @@ if ($input->param('newflags')) {
|
|||
push @loop, \%row;
|
||||
}
|
||||
|
||||
my $borrowercategory = GetBorrowercategory( $bor->{'categorycode'} );
|
||||
my $category_type = $borrowercategory->{'category_type'};
|
||||
( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' );
|
||||
|
||||
$template->param(borrowernumber => $member,
|
||||
borrowernumber => $bor->{'borrowernumber'},
|
||||
cardnumber => $bor->{'cardnumber'},
|
||||
|
|
|
|||
|
|
@ -76,6 +76,11 @@ if ( $newpassword && ! $errormsg ) {
|
|||
for (my $i=0; $i<$length; $i++) {
|
||||
$defaultnewpassword.=substr($chars, int(rand(length($chars))),1);
|
||||
}
|
||||
|
||||
my $borrowercategory = GetBorrowercategory( $bor->{'categorycode'} );
|
||||
my $category_type = $borrowercategory->{'category_type'};
|
||||
( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' );
|
||||
|
||||
$template->param( othernames => $bor->{'othernames'},
|
||||
surname => $bor->{'surname'},
|
||||
firstname => $bor->{'firstname'},
|
||||
|
|
|
|||
|
|
@ -128,6 +128,11 @@ if ( $check == 0 ) {
|
|||
'total' => $totalnotify
|
||||
};
|
||||
}
|
||||
|
||||
my $borrowercategory = GetBorrowercategory( $data->{'categorycode'} );
|
||||
my $category_type = $borrowercategory->{'category_type'};
|
||||
( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' );
|
||||
|
||||
$template->param(
|
||||
allfile => \@allfile,
|
||||
firstname => $data->{'firstname'},
|
||||
|
|
|
|||
|
|
@ -76,6 +76,10 @@ for (my $i=0;$i<$count;$i++){
|
|||
push(@loop_reading,\%line);
|
||||
}
|
||||
|
||||
my $borrowercategory = GetBorrowercategory( $data->{'categorycode'} );
|
||||
my $category_type = $borrowercategory->{'category_type'};
|
||||
( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' );
|
||||
|
||||
$template->param(
|
||||
biblionumber => $data->{'biblionumber'},
|
||||
title => $data->{'title'},
|
||||
|
|
|
|||
Loading…
Reference in New Issue