From 783047fb08123d877b5fc5195a751f8f65bdf73a Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Thu, 31 Oct 2024 19:44:35 -0700 Subject: [PATCH] Bug 38309: Cannot delete additional fields Deleting an additional field tries to do a GET of ?op=delete... which no longer works with CSRF protection. It needs to be a POST with op=cud-delete. Test plan: 1. Administration - Additional fields, click any table name 2. New field, fill in a name and Save 3. In the row for your field, click Delete 4. You have a blank page 5. Apply patch, click the browser Back button, refresh the page 6. In the row for your undeleted field, click Delete 7. Your field is deleted Sponsored-by: Chetco Community Public Library Signed-off-by: David Nind Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer (cherry picked from commit d5fbb1e87c6964b27b7d9829ca41e40f49869009) Signed-off-by: Lucas Gass --- .../prog/en/modules/admin/additional-fields.tt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt index 3a9e5fdfe3..0cb319a4fe 100755 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt @@ -1,5 +1,6 @@ [% USE AuthorisedValues %] [% USE raw %] +[% USE Asset %] [% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] @@ -180,7 +181,7 @@ [% END %] Edit - Delete + Delete [% END %] @@ -272,6 +273,7 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE "datatables.inc" %] + [% Asset.js("js/form-submit.js") | $raw %]