Bugzilla – Attachment 7317 Details for
Bug 6964
'Add child' function should be dependant on system preference 'borrowerRelationship'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 6964 - 'Add child' function should be dependant on system preference 'borrowerRelationship'
SIGNED-OFF-Bug-6964---Add-child-function-should-be.patch (text/plain), 10.57 KB, created by
Owen Leonard
on 2012-01-24 14:45:58 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 6964 - 'Add child' function should be dependant on system preference 'borrowerRelationship'
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2012-01-24 14:45:58 UTC
Size:
10.57 KB
patch
obsolete
>From 42a58e269eea591a4c31d0311844cdad8fd60386 Mon Sep 17 00:00:00 2001 >From: Aleksa Vujicic <aleksa@catalyst.net.nz> >Date: Fri, 20 Jan 2012 16:00:19 +1300 >Subject: [PATCH] [SIGNED-OFF] Bug 6964 - 'Add child' function should be dependant on system preference 'borrowerRelationship' >Content-Type: text/plain; charset="utf-8" > >The 'Add Child' button is not shown if 'borrowerRelationship' is empty. > >System preference description changed. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > 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(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 1b6c619..e8d22cb 100755 >--- a/circ/circulation.pl >+++ b/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 >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc >index 913076f..a4acfdf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc >+++ b/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&guarantorid=[% borrowernumber %]&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&guarantorid=[% borrowernumber %]&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&borrowernumber=[% borrowernumber %]&category_type=[% category_type %]">Duplicate</a></li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >index bc3e920..bad8502 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >+++ b/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&borrowernumber=[% borrowernumber %]&category_type=A">Edit</a></li> > [% END %] > [% END %] >- [% IF ( adultborrower ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&guarantorid=[% borrowernumber %]&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&guarantorid=[% borrowernumber %]&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&borrowernumber=[% borrowernumber %]&category_type=[% category_type %]">Duplicate</a></li> > <li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&print=page">Print Page</a></li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index 0e2f73b..9c3f76f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/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 >diff --git a/members/boraccount.pl b/members/boraccount.pl >index 2805f27..44db953 100755 >--- a/members/boraccount.pl >+++ b/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; >diff --git a/members/deletemem.pl b/members/deletemem.pl >index b1ba709..924245a 100755 >--- a/members/deletemem.pl >+++ b/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); >diff --git a/members/mancredit.pl b/members/mancredit.pl >index 3c664c2..88200d0 100755 >--- a/members/mancredit.pl >+++ b/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; > } >diff --git a/members/maninvoice.pl b/members/maninvoice.pl >index 1f42093..f1c572c 100755 >--- a/members/maninvoice.pl >+++ b/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; > } >diff --git a/members/member-flags.pl b/members/member-flags.pl >index 76f300e..ca8c9d0 100755 >--- a/members/member-flags.pl >+++ b/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; >diff --git a/members/member-password.pl b/members/member-password.pl >index 25e9551..8128a3d 100755 >--- a/members/member-password.pl >+++ b/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 ''), > ); > > >diff --git a/members/moremember.pl b/members/moremember.pl >index 6e5407c..c477100 100755 >--- a/members/moremember.pl >+++ b/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 >diff --git a/members/notices.pl b/members/notices.pl >index 41f2a90..51a843c 100755 >--- a/members/notices.pl >+++ b/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; > >diff --git a/members/pay.pl b/members/pay.pl >index 6bc18fc..72a109f 100755 >--- a/members/pay.pl >+++ b/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; >diff --git a/members/paycollect.pl b/members/paycollect.pl >index cbddc05..e05a5a6 100755 >--- a/members/paycollect.pl >+++ b/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; >diff --git a/members/readingrec.pl b/members/readingrec.pl >index b4fb8a7..c4a8237 100755 >--- a/members/readingrec.pl >+++ b/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; > >-- >1.7.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6964
:
7306
|
7317
|
7430
|
7431