From 868a0a2df0f5d827881886f13ea3a3a1ecee4db3 Mon Sep 17 00:00:00 2001 From: Emily Lamancusa Date: Fri, 4 Apr 2025 13:25:43 -0400 Subject: [PATCH] Bug 39567: Remove form-submit includes from tt files Now that the form-submit code has been added to the global js-includes files for both the staff interface and OPAC, it no longer needs to be included directly in each template file. 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 OPAC > Account page > Renew a checkout to confirm the link submission still works as expected in the OPAC i. Check out an item to a patron ii. Set a known password for that patron iii. Log into that patron's account in the OPAC iv. Click the "Renew" link next to that checkout in the checkouts table on the patron's OPAC account page --> Confirm the item is renewed as expected 5. Test some of the following buttons to confirm the link submission still works as expected in the staff interface: - 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 --- koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc | 3 --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 1 - koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt | 1 - koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt | 1 - .../intranet-tmpl/prog/en/modules/admin/additional-fields.tt | 1 - .../intranet-tmpl/prog/en/modules/admin/background_jobs.tt | 1 - .../intranet-tmpl/prog/en/modules/admin/ill_batch_statuses.tt | 1 - koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 1 - koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 1 - .../intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt | 1 - koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt | 1 - koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 1 - koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt | 1 - .../prog/en/modules/reports/guided_reports_start.tt | 1 - koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 1 - .../en/modules/rotating_collections/rotatingCollections.tt | 1 - koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt | 1 - .../intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 1 - koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 1 - 20 files changed, 1 insertion(+), 22 deletions(-) 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 2d65e83dc1..759b745e01 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 65a052e1d6..1f4da5ee78 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -1100,7 +1100,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 75cce41d38..91ef1acade 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 5066a25a45..b931741d4f 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 5f760ab998..1a501f82a4 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 3514a4284e..f6cddb1d60 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1242,7 +1242,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 742d520a0b..aca2b0a451 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 @@ -231,7 +231,6 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE 'greybox.inc' %] [% INCLUDE 'datatables.inc' %] - [% Asset.js("js/form-submit.js") | $raw %] [% Asset.js("js/labels-menu.js") | $raw %] [% Asset.js("js/global.js") | $raw %]