From 372136b0d8dc6e733c10ceba977a87d403ac9411 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 8 Oct 2024 13:39:31 -0400 Subject: [PATCH] Bug 38125: Add a warning if privacy pulldown is changed to "never" It is possible to interpret the language on opac-privacy.pl as only acting on future checkins and not current historical checkouts. We should add clarifying text to that page Test plan: 1) Apply this patch 2) Enable opac privacy 3) Change pulldown to "never" 4) Note the warning message appears Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt | 1 + koha-tmpl/opac-tmpl/bootstrap/js/privacy.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt index 892404cc24f..bb1b0ee707d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt @@ -96,6 +96,7 @@ +
This option will delete all previous checkout history immediately.
[% IF has_guarantor_flag && (Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') || Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) %] [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/privacy.js b/koha-tmpl/opac-tmpl/bootstrap/js/privacy.js index 92289679a61..bc7b6b66a72 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/privacy.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/privacy.js @@ -3,4 +3,13 @@ $(document).ready(function(){ $('.privacy-confirm-delete').on('click',function(){ return confirmDelete( __("Warning: Cannot be undone. Please confirm once again") ); }); + + $('#never-warning').hide(); + $('#privacy').on('change', function() { + if ( $(this).val() == '2' ) { + $('#never-warning').show(); + } else { + $('#never-warning').hide(); + } + }); }); -- 2.47.0