Koha/koha-tmpl/opac-tmpl/bootstrap/js/privacy.js
Kyle M Hall c8594e2194
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 <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-29 16:14:43 +01:00

15 lines
450 B
JavaScript

/* global __ confirmDelete */
$(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();
}
});
});