From 1723871dac9417278087ec2c6c4bf50252a143b9 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 20 Nov 2024 13:24:12 +0000 Subject: [PATCH] Bug 38495: Use JS to submit form to cancel background jobs This patch adjusts the link to cancel jobs to be submitted as a POST with cud-cancel operation To test: 1 - Stop your long tasks bacground jobs worker sudo koha-worker --stop --queue long_tasks kohadev 2 - Stage a file for import 3 - Administration -> Manage jobs 4 - See your new job 5 - Click 'cancel' 6 - It didn't work 7 - Apply patch 8 - Browse to jobs again 9 - Click 'Cancel' 10 - Job is successfully cancelled --- .../intranet-tmpl/prog/en/modules/admin/background_jobs.tt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt index e6b5fbf38c0..9377dc367d4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt @@ -153,6 +153,7 @@ [% MACRO jsinclude BLOCK %] [% Asset.js("js/admin-menu.js") | $raw %] + [% Asset.js("js/form-submit.js") | $raw %] [% INCLUDE 'js-date-format.inc' %] [% INCLUDE 'datatables.inc' %]