@@ -, +, @@
=> in Patron without guarantor there is no Privacy section
---
Koha/Schema/Result/Borrower.pm | 12 +++-
Koha/Schema/Result/Deletedborrower.pm | 12 +++-
api/v1/swagger/definitions/patron.json | 4 ++
.../en/modules/admin/preferences/opac.pref | 7 ++
.../en/modules/admin/preferences/patrons.pref | 6 ++
.../prog/en/modules/members/memberentrygen.tt | 15 ++++
.../prog/en/modules/members/moremember.tt | 11 ++-
.../bootstrap/en/modules/opac-memberentry.tt | 72 +++++++++++++++----
.../bootstrap/en/modules/opac-privacy.tt | 36 +++++++---
opac/opac-memberentry.pl | 4 +-
opac/opac-privacy.pl | 5 +-
opac/svc/patron/show_fines_to_relatives | 59 +++++++++++++++
12 files changed, 210 insertions(+), 33 deletions(-)
create mode 100755 opac/svc/patron/show_fines_to_relatives
--- a/Koha/Schema/Result/Borrower.pm
+++ a/Koha/Schema/Result/Borrower.pm
@@ -402,6 +402,12 @@ __PACKAGE__->table("borrowers");
default_value: 1
is_nullable: 0
+=head2 privacy_guarantor_fines
+
+ data_type: 'tinyint'
+ default_value: 0
+ is_nullable: 0
+
=head2 privacy_guarantor_checkouts
data_type: 'tinyint'
@@ -619,6 +625,8 @@ __PACKAGE__->add_columns(
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"privacy",
{ data_type => "integer", default_value => 1, is_nullable => 0 },
+ "privacy_guarantor_fines",
+ { data_type => "tinyint", default_value => 0, is_nullable => 0 },
"privacy_guarantor_checkouts",
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
"checkprevcheckout",
@@ -1552,8 +1560,8 @@ Composing rels: L -> ordernumber
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-05-17 12:11:31
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rb0wEXHaSvYum10aZjbAOA
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-05-22 04:33:29
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lbMdmIHlRt+zayG5+Rq4/w
__PACKAGE__->add_columns(
'+anonymized' => { is_boolean => 1 },
--- a/Koha/Schema/Result/Deletedborrower.pm
+++ a/Koha/Schema/Result/Deletedborrower.pm
@@ -399,6 +399,12 @@ __PACKAGE__->table("deletedborrowers");
default_value: 1
is_nullable: 0
+=head2 privacy_guarantor_fines
+
+ data_type: 'tinyint'
+ default_value: 0
+ is_nullable: 0
+
=head2 privacy_guarantor_checkouts
data_type: 'tinyint'
@@ -604,6 +610,8 @@ __PACKAGE__->add_columns(
{ data_type => "integer", is_nullable => 1 },
"privacy",
{ data_type => "integer", default_value => 1, is_nullable => 0 },
+ "privacy_guarantor_fines",
+ { data_type => "tinyint", default_value => 0, is_nullable => 0 },
"privacy_guarantor_checkouts",
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
"checkprevcheckout",
@@ -642,8 +650,8 @@ __PACKAGE__->add_columns(
);
-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-05-17 12:11:31
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:STNFbPgDGWmyrZUFj/n+MA
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-05-22 04:33:29
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zK1jC6Wawwj8B2ch9KFByw
# You can replace this text with custom code or comments, and it will be preserved on regeneration
--- a/api/v1/swagger/definitions/patron.json
+++ a/api/v1/swagger/definitions/patron.json
@@ -243,6 +243,10 @@
"type": "integer",
"description": "controls if relatives can see this patron's checkouts"
},
+ "privacy_guarantor_fines": {
+ "type": "integer",
+ "description": "controls if relatives can see this patron's fines"
+ },
"check_previous_checkout": {
"type": "string",
"description": "produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'"
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
@@ -706,6 +706,13 @@ OPAC:
yes: Allow
no: "Don't allow"
- patrons to choose their own privacy settings for showing the patron's checkouts to the patron's guarantor".
+ -
+ - pref: AllowPatronToSetFinesVisibilityForGuarantor
+ default: 0
+ choices:
+ yes: Allow
+ no: "Don't allow"
+ - patrons to choose their own privacy settings for showing the patron's fines to the patron's guarantor".
-
- Use borrowernumber
- pref: AnonymousPatron
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
@@ -184,6 +184,12 @@ Patrons:
yes: Allow
no: "Don't allow"
- staff to set the ability for a patron's checkouts to be viewed by linked patrons in the OPAC.
+ -
+ - pref: AllowStaffToSetFinesVisibilityForGuarantor
+ choices:
+ yes: Allow
+ no: "Don't allow"
+ - staff to set the ability for a patron's fines to be viewed by linked patrons in the OPAC.
-
- Card numbers for patrons must be
- pref: CardnumberLength
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
@@ -429,6 +429,21 @@
Allow guarantors of this patron to view this patron's checkouts from the OPAC
[% END %]
+ [% IF relationships && Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %]
+
+
+
+
Allow guarantors of this patron to view this patron's fines from the OPAC
+
+ [% END %]
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
@@ -490,7 +490,16 @@
Show checkouts to guarantor
- [% IF privacy_guarantor_checkouts %]
+ [% IF patron.privacy_guarantor_checkouts %]
+ Yes
+ [% ELSE %]
+ No
+ [% END %]
+
+
+
+ Show fines to guarantor
+ [% IF patron.privacy_guarantor_fines %]
Yes
[% ELSE %]
No
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt
@@ -100,10 +100,11 @@
You typed in the wrong characters in the box before submitting. Please try again.
[% END %]
- [% IF patron.guarantor_relationships && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
+ [% IF has_guarantor_flag && !Koha.Preference('OPACPrivacy') && ( Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') || Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) %]