Bug 31503: Make opac-patron-consent more generic
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 31 Aug 2023 08:40:29 +0000 (08:40 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 25 Oct 2023 13:35:20 +0000 (10:35 -0300)
commit0a471bfeda152207452884466d690794ce3672fc
tree4e86008eb38893629b13061e1eebede54011c8c5
parent5d682d514b8746a74ec1d4b3ea3e016c51ff7b71
Bug 31503: Make opac-patron-consent more generic

Adds $patron->consent and $consents->available_types.
Incorporates them into script/template.
Provides two unit tests.

Note: A follow-up patch helps you test this with an
example plugin.

Test plan:
Run t/db_dependent/Koha/Patron.t
Run t/db_dependent/Koha/Patron/Consents.t
Toggle the value of pref PrivacyPolicyConsent and look at
OPAC account, tab Consents.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Patron.pm
Koha/Patron/Consents.pm
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt
opac/opac-patron-consent.pl
t/db_dependent/Koha/Patron.t
t/db_dependent/Koha/Patron/Consents.t