@@ -, +, @@
---
circ/circulation.pl | 1 -
koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc | 6 +++---
members/boraccount.pl | 1 -
members/mancredit.pl | 1 -
members/maninvoice.pl | 1 -
members/member-flags.pl | 1 -
members/member-password.pl | 1 -
members/moremember.pl | 1 -
members/printfeercpt.pl | 1 -
members/printinvoice.pl | 1 -
members/readingrec.pl | 1 -
11 files changed, 3 insertions(+), 13 deletions(-)
--- a/circ/circulation.pl
+++ a/circ/circulation.pl
@@ -606,7 +606,6 @@ if ( $patron ) {
patron => $patron,
categoryname => $patron->category->description,
expiry => $patron->dateexpiry,
- is_child => ( $patron->category->category_type eq 'C' ),
);
}
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
@@ -34,7 +34,7 @@ $(document).ready(function(){
$(".btn-group").removeClass("open");
return false;
});
- [% IF ( is_child ) %]$("#updatechild").click(function(){
+ [% IF ( patron.is_child ) %]$("#updatechild").click(function(){
update_child();
$(".btn-group").removeClass("open");
});[% END %]
@@ -92,7 +92,7 @@ function confirm_both_deletion() {
}
}
-[% IF ( is_child ) %]function confirm_updatechild() {
+[% IF ( patron.is_child ) %]function confirm_updatechild() {
var is_confirmed = window.confirm(_("Are you sure you want to update this child to an Adult category? This cannot be undone."));
if (is_confirmed) {
window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=[% patron.borrowernumber %]&catcode=[% catcode %]&catcode_multi=[% CATCODE_MULTI %]';
@@ -197,7 +197,7 @@ function searchToHold(){
[% ELSE %]
Delete
[% END %]
- [% IF ( is_child ) %]
+ [% IF ( patron.is_child ) %]
Update child to adult patron
[% ELSE %]
Update child to adult patron
--- a/members/boraccount.pl
+++ a/members/boraccount.pl
@@ -108,7 +108,6 @@ $template->param(
finesview => 1,
total => sprintf("%.2f",$total),
totalcredit => $totalcredit,
- is_child => ($patron->category->category_type eq 'C'),
reverse_col => $reverse_col,
accounts => $accts,
RoutingSerials => C4::Context->preference('RoutingSerials'),
--- a/members/mancredit.pl
+++ a/members/mancredit.pl
@@ -96,7 +96,6 @@ if ($add){
$template->param(
finesview => 1,
- is_child => ($patron->category->category_type eq 'C'), # FIXME is_child should be a Koha::Patron method
RoutingSerials => C4::Context->preference('RoutingSerials'),
);
output_html_with_http_headers $input, $cookie, $template->output;
--- a/members/maninvoice.pl
+++ a/members/maninvoice.pl
@@ -122,7 +122,6 @@ if ($add){
$template->param(
patron => $patron,
finesview => 1,
- is_child => ($patron->category->category_type eq 'C'),
RoutingSerials => C4::Context->preference('RoutingSerials'),
);
output_html_with_http_headers $input, $cookie, $template->output;
--- a/members/member-flags.pl
+++ a/members/member-flags.pl
@@ -196,7 +196,6 @@ if (C4::Context->preference('ExtendedPatronAttributes')) {
$template->param(
patron => $patron,
loop => \@loop,
- is_child => ($category_type eq 'C'),
RoutingSerials => C4::Context->preference('RoutingSerials'),
csrf_token => Koha::Token->new->generate_csrf( { session_id => scalar $input->cookie('CGISESSID'), } ),
);
--- a/members/member-password.pl
+++ a/members/member-password.pl
@@ -120,7 +120,6 @@ if ( C4::Context->preference('ExtendedPatronAttributes') ) {
$template->param(
patron => $patron,
destination => $destination,
- is_child => ( $category_type eq 'C' ),
minPasswordLength => $minpw,
RoutingSerials => C4::Context->preference('RoutingSerials'),
csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID'), }),
--- a/members/moremember.pl
+++ a/members/moremember.pl
@@ -342,7 +342,6 @@ $template->param(
totaldue_raw => $total,
overdues_exist => $overdues_exist,
StaffMember => $category_type eq 'S',
- is_child => $category_type eq 'C',
samebranch => $samebranch,
quickslip => $quickslip,
housebound_role => scalar $patron->housebound_role,
--- a/members/printfeercpt.pl
+++ a/members/printfeercpt.pl
@@ -122,7 +122,6 @@ $template->param(
finesview => 1,
total => sprintf("%.2f",$total),
totalcredit => $totalcredit,
- is_child => ($category->category_type eq 'C'),
accounts => \@accountrows );
output_html_with_http_headers $input, $cookie, $template->output;
--- a/members/printinvoice.pl
+++ a/members/printinvoice.pl
@@ -122,7 +122,6 @@ $template->param(
finesview => 1,
total => sprintf( "%.2f", $total ),
totalcredit => $totalcredit,
- is_child => ( $category->category_type eq 'C' ),
accounts => \@accountrows
);
--- a/members/readingrec.pl
+++ a/members/readingrec.pl
@@ -116,7 +116,6 @@ if (C4::Context->preference('ExtendedPatronAttributes')) {
$template->param(
patron => $patron,
readingrecordview => 1,
- is_child => ( $category->category_type eq 'C' ),
loop_reading => $issues,
RoutingSerials => C4::Context->preference('RoutingSerials'),
);
--