From 17054c9f12b6deee340b5bc0ce1d4e524d70f607 Mon Sep 17 00:00:00 2001 From: Emily Lamancusa Date: Fri, 4 Apr 2025 13:25:43 -0400 Subject: [PATCH] Bug 39567: Move form-submit JS into global js To test: 1. Apply patch 2. Clear browser cache 3. git grep "form-submit.js" --> Confirm that all imports of the form-submit.js asset have been removed, and the only results are the comment in global.js and staff-global.js 4. Test some of the following buttons and confirm they work as expected (all buttons except the first are in the staff interface): - OPAC > Account page > Renew a checkout - Bib record > Holds > Revert transit/waiting status on a hold - Acquisitions > Basket > Create EDIFACT order - Acquisitions > Invoices > detail for a specific invoice > Delete - Acquisitions > Invoices > perform actions on invoices using the action drop-down - Acquisitions > Invoices > open/close invoices by selecting the checkboxes - Administration > Additional fields > Delete an additional field - Administration > Background jobs > Cancel a background job - Edit an item > scroll up > Actions drop-down > Print label - Cataloging > Label creator > Manage label batches > Edit a batch > Delete batch - Cataloging > Label creator > Manage label batches > Delete a batch - Patron account > holds > delete a hold - Tools > Patron lists > delete a list from the Actions drop-down - Reports > Saved reports > Preview SQL on a report > Delete - Reports > Saved reports > Delete a report from the actions drop-down - Rotating collections > Delete a collection from the actions drop-down - Stock rotations > move item to the next stage - Stock rotations > remove item from a rota - Stock rotations > Add/remove "In demand" - More > Lists > edit a specific list > Edit drop-down > Delete --- .../prog/en/includes/holds_table.inc | 3 -- .../prog/en/modules/acqui/basket.tt | 1 - .../prog/en/modules/acqui/invoice.tt | 1 - .../prog/en/modules/acqui/invoices.tt | 1 - .../en/modules/admin/additional-fields.tt | 1 - .../prog/en/modules/admin/background_jobs.tt | 1 - .../en/modules/admin/ill_batch_statuses.tt | 1 - .../prog/en/modules/cataloguing/additem.tt | 1 - .../prog/en/modules/circ/circulation.tt | 1 - .../en/modules/labels/label-edit-batch.tt | 1 - .../prog/en/modules/labels/label-manage.tt | 1 - .../prog/en/modules/members/moremember.tt | 1 - .../prog/en/modules/patron_lists/lists.tt | 1 - .../modules/reports/guided_reports_start.tt | 1 - .../prog/en/modules/reserve/request.tt | 1 - .../rotatingCollections.tt | 1 - .../prog/en/modules/tools/stockrotation.tt | 1 - .../prog/en/modules/virtualshelves/shelves.tt | 1 - .../intranet-tmpl/prog/js/form-submit.js | 38 ------------------ .../intranet-tmpl/prog/js/staff-global.js | 38 ++++++++++++++++++ .../bootstrap/en/modules/opac-user.tt | 1 - .../opac-tmpl/bootstrap/js/form-submit.js | 35 ----------------- koha-tmpl/opac-tmpl/bootstrap/js/global.js | 39 +++++++++++++++++++ 23 files changed, 77 insertions(+), 94 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/js/form-submit.js delete mode 100644 koha-tmpl/opac-tmpl/bootstrap/js/form-submit.js diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc index 2d65e83dc1f..759b745e016 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc @@ -2,9 +2,6 @@ [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] [% USE AuthorisedValues %] -[%#This include depends on the asset js/form-submit.js. Any template making use of this include must import form-submit.js as well. %] -[%#FIXME can form-submit.js be imported into this file directly? %] - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 454af49caf7..e5bd714eec4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -1093,7 +1093,6 @@ [% MACRO jsinclude BLOCK %] [% Asset.js("js/acquisitions-menu.js") | $raw %] - [% Asset.js("js/form-submit.js") | $raw %] [% INCLUDE 'datatables.inc' %] [% Asset.js("js/acq.js") | $raw %] [% INCLUDE 'calendar.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt index a083d41e2e3..966420858a9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ -540,7 +540,6 @@ [% MACRO jsinclude BLOCK %] [% Asset.js("js/acquisitions-menu.js") | $raw %] - [% Asset.js("js/form-submit.js") | $raw %] [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %] [% Asset.js("js/acq.js") | $raw %] [% Asset.js("js/additional-fields-entry.js") | $raw %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt index fb00c76613d..aebf5a28641 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -474,7 +474,6 @@ [% MACRO jsinclude BLOCK %] [% Asset.js("js/acquisitions-menu.js") | $raw %] - [% Asset.js("js/form-submit.js") | $raw %] [% INCLUDE 'datatables.inc' %] [% INCLUDE 'calendar.inc' %] [% INCLUDE 'select2.inc' %] 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 8b97922eb2a..bfd8a7096f7 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 @@ -306,7 +306,6 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE "datatables.inc" %] - [% Asset.js("js/form-submit.js") | $raw %] 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 d81f3522f6e..b19177158ac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1228,7 +1228,6 @@ [% 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/labels/label-edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt index 5b93b9b4f96..b8f31a1faa2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt @@ -230,7 +230,6 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE 'greybox.inc' %] [% INCLUDE 'datatables.inc' %] - [% Asset.js("js/form-submit.js") | $raw %] [% Asset.js("js/labels-menu.js") | $raw %]