@@ -, +, @@
---
circ/circulation.pl | 1 +
.../prog/en/includes/circ-toolbar.inc | 2 +-
.../prog/en/includes/members-toolbar.inc | 2 +-
.../prog/en/modules/admin/preferences/patrons.pref | 2 +-
members/boraccount.pl | 1 +
members/deletemem.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/notices.pl | 1 +
members/pay.pl | 2 ++
members/paycollect.pl | 1 +
members/readingrec.pl | 1 +
15 files changed, 16 insertions(+), 3 deletions(-)
--- a/circ/circulation.pl
+++ a/circ/circulation.pl
@@ -705,6 +705,7 @@ $template->param(
soundon => C4::Context->preference("SoundOn"),
fast_cataloging => $fast_cataloging,
CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"),
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
# save stickyduedate to session
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
@@ -118,7 +118,7 @@ function update_child() {
[% END %]
[% END %]
[% IF ( CAN_user_borrowers ) %]
- [% IF ( adultborrower ) %]
Add child[% END %]
+ [% IF ( adultborrower AND activeBorrowerRelationship ) %]Add child[% END %]
[% IF ( CAN_user_staffaccess ) %] Change Password[% END %]
[% END %]
Duplicate
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
@@ -114,7 +114,7 @@ function update_child() {
Edit
[% END %]
[% END %]
- [% IF ( adultborrower ) %]Add child[% END %]
+ [% IF ( adultborrower AND activeBorrowerRelationship ) %]Add child[% END %]
[% IF CAN_user_staffaccess %]Change Password [% END %]
Duplicate
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
@@ -42,7 +42,7 @@ Patrons:
- "Guarantors can be the following of those they guarantee:"
- pref: borrowerRelationship
class: multi
- - (input multiple choices separated by |)
+ - (input multiple choices separated by |). Leave empty to deactivate
-
- "Borrowers can have the following titles:"
- pref: BorrowersTitles
--- a/members/boraccount.pl
+++ a/members/boraccount.pl
@@ -128,6 +128,7 @@ $template->param(
is_child => ($data->{'category_type'} eq 'C'),
reverse_col => $reverse_col,
accounts => $accts,
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;
--- a/members/deletemem.pl
+++ a/members/deletemem.pl
@@ -102,6 +102,7 @@ if ($countissues > 0 or $flags->{'CHARGES'} or $data->{'borrowernumber'}){
email => $bor->{'email'},
branchcode => $bor->{'branchcode'},
branchname => GetBranchName($bor->{'branchcode'}),
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
if ($countissues >0) {
$template->param(ItemsOnIssues => $countissues);
--- a/members/mancredit.pl
+++ a/members/mancredit.pl
@@ -106,6 +106,7 @@ if (C4::Context->preference('ExtendedPatronAttributes')) {
branchcode => $data->{'branchcode'},
branchname => GetBranchName($data->{'branchcode'}),
is_child => ($data->{'category_type'} eq 'C'),
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;
}
--- a/members/maninvoice.pl
+++ a/members/maninvoice.pl
@@ -133,6 +133,7 @@ if (C4::Context->preference('ExtendedPatronAttributes')) {
branchcode => $data->{'branchcode'},
branchname => GetBranchName($data->{'branchcode'}),
is_child => ($data->{'category_type'} eq 'C'),
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;
}
--- a/members/member-flags.pl
+++ a/members/member-flags.pl
@@ -191,6 +191,7 @@ $template->param(
branchname => GetBranchName($bor->{'branchcode'}),
loop => \@loop,
is_child => ($bor->{'category_type'} eq 'C'),
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;
--- a/members/member-password.pl
+++ a/members/member-password.pl
@@ -121,6 +121,7 @@ if (C4::Context->preference('ExtendedPatronAttributes')) {
destination => $destination,
is_child => ($bor->{'category_type'} eq 'C'),
defaultnewpassword => $defaultnewpassword,
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
--- a/members/moremember.pl
+++ a/members/moremember.pl
@@ -481,6 +481,7 @@ $template->param(
"dateformat_" . (C4::Context->preference("dateformat") || '') => 1,
samebranch => $samebranch,
quickslip => $quickslip,
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
#Get the slip news items
--- a/members/notices.pl
+++ a/members/notices.pl
@@ -68,6 +68,7 @@ $template->param(
sentnotices => 1,
branchname => GetBranchName($borrower->{'branchcode'}),
categoryname => $borrower->{'description'},
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;
--- a/members/pay.pl
+++ a/members/pay.pl
@@ -103,6 +103,8 @@ for (@names) {
}
}
+$template->param( activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne '') );
+
add_accounts_to_template();
output_html_with_http_headers $input, $cookie, $template->output;
--- a/members/paycollect.pl
+++ a/members/paycollect.pl
@@ -138,6 +138,7 @@ $template->param(
borrowenumber => $borrowernumber, # some templates require global
borrower => $borrower,
total => $total_due
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;
--- a/members/readingrec.pl
+++ a/members/readingrec.pl
@@ -133,6 +133,7 @@ $template->param(
branchname => GetBranchName($data->{'branchcode'}),
showfulllink => (scalar @loop_reading > 50),
loop_reading => \@loop_reading,
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;
--