Browse Source

Bug 6964 - 'Add child' function should be dependant on system preference 'borrowerRelationship'

The 'Add Child' button is not shown if 'borrowerRelationship' is empty.

System preference description changed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
3.8.x
Aleksa Vujicic 12 years ago
committed by Paul Poulain
parent
commit
3982d97af3
  1. 1
      circ/circulation.pl
  2. 2
      koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
  3. 2
      koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
  4. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
  5. 1
      members/boraccount.pl
  6. 1
      members/deletemem.pl
  7. 1
      members/mancredit.pl
  8. 1
      members/maninvoice.pl
  9. 1
      members/member-flags.pl
  10. 1
      members/member-password.pl
  11. 1
      members/moremember.pl
  12. 1
      members/notices.pl
  13. 2
      members/pay.pl
  14. 1
      members/paycollect.pl
  15. 1
      members/readingrec.pl

1
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

2
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 ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
[% IF ( adultborrower AND activeBorrowerRelationship ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
[% IF ( CAN_user_staffaccess ) %] <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change Password</a></li>[% END %]
[% END %]
<li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">Duplicate</a></li>

2
koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc

@ -114,7 +114,7 @@ function update_child() {
<li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;category_type=A">Edit</a></li>
[% END %]
[% END %]
[% IF ( adultborrower ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
[% IF ( adultborrower AND activeBorrowerRelationship ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
[% IF CAN_user_staffaccess %]<li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change Password</a></li> [% END %]
<li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">Duplicate</a></li>
<li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&amp;print=page">Print Page</a></li>

2
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

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

1
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);

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

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

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

1
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 ''),
);

1
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

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

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

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

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

Loading…
Cancel
Save