From 08a9ded6b008d5d90d7951440b7f672284eb3bc7 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 24 Jan 2025 17:38:00 +0000 Subject: [PATCH] Bug 37266: patron_lists/delete.pl should have CSRF protection This patch adds CSRF protection to patron list deletions. Also changed: The "Delete selected lists" button is now in a floating toolbar. To test, apply the patch and go to Tools -> Patron lists. - If necessary, create a few patron lists. - Test the two methods for list deletion available on the page: - Check one or more checkboxes and then click the "Delete selected lists" at the top of the page. - Click the "Actions" button for an individual list and choose "Delete list." - Open the checkout page for a patron. - Under the "Patron lists" tab, add the patron to a list. - Click the "Actions" button for an that list and choose "Delete list." - When you are taken to the patron lists page the list should have been deleted. - Perform the same test on the patron details page. Sponsored-by: Athens County Public Libraries Signed-off-by: Phil Ringnalda Signed-off-by: Julian Maurice Signed-off-by: Katrin Fischer --- .../prog/en/modules/circ/circulation.tt | 1 + .../prog/en/modules/members/moremember.tt | 1 + .../prog/en/modules/patron_lists/lists.tt | 207 ++++++++++-------- .../modules/patron_lists/patron-lists-tab.tt | 20 +- patron_lists/delete.pl | 15 +- 5 files changed, 142 insertions(+), 102 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 5d05ba5c13..66cb852175 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1199,6 +1199,7 @@ [% Asset.js("js/checkouts.js") | $raw %] [% Asset.js("js/tables/bookings.js") | $raw %] [% Asset.js("js/recalls.js") | $raw %] + [% Asset.js("js/form-submit.js") | $raw %] [% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index c86144d82c..16c2b33380 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -786,6 +786,7 @@ [% INCLUDE 'str/members-menu.inc' %] [% Asset.js("js/members-menu.js") | $raw %] [% Asset.js("js/recalls.js") | $raw %] + [% Asset.js("js/form-submit.js") | $raw %]