Bugzilla – Attachment 182288 Details for
Bug 39567
Move form-submit js into js includes files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39567: Remove form-submit includes from tt files
Bug-39567-Remove-form-submit-includes-from-tt-file.patch (text/plain), 15.97 KB, created by
Martin Renvoize (ashimema)
on 2025-05-12 14:21:18 UTC
(
hide
)
Description:
Bug 39567: Remove form-submit includes from tt files
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-05-12 14:21:18 UTC
Size:
15.97 KB
patch
obsolete
>From 99e727aec09cfb36fa2cddc64748c92f817e36f9 Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >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 > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > 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 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? %] >- > <table id="patron_holds_table" class="holds_table"> > <thead> > <tr> >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 65a052e1d67..1f4da5ee78b 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 75cce41d388..91ef1acade2 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 5066a25a45e..b931741d4fb 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 5f760ab9988..1a501f82a41 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 %] > <script> > $(document).ready(function () { > $("#selecttable").find(":submit").hide(); >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 3d95000b6b8..a6d78befa9a 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 >@@ -142,7 +142,6 @@ > > [% 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' %] > <script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/ill_batch_statuses.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/ill_batch_statuses.tt >index eaf0b1e436f..ffe332423db 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/ill_batch_statuses.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/ill_batch_statuses.tt >@@ -154,7 +154,6 @@ > > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/admin-menu.js") | $raw %] >- [% Asset.js("js/form-submit.js") | $raw %] > [% INCLUDE 'datatables.inc' %] > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index 62315b99216..2f4062c9cd3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -36,7 +36,6 @@ > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'str/cataloging_additem.inc' %] > [% Asset.js("js/cataloging_additem.js") | $raw %] >-[% Asset.js("js/form-submit.js") | $raw %] > <script> > var has_item_groups = "[% item_groups.size | html %]"; > </script> >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 3514a4284e2..f6cddb1d60f 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 742d520a0b6..aca2b0a4511 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 %] > <script> > function dofocus() { // named function req'd for body onload event by some FF and IE7 security models >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt >index 5b285b13695..1d87edfb4f0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt >@@ -158,7 +158,6 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'greybox.inc' %] > [% INCLUDE 'datatables.inc' %] >- [% Asset.js("js/form-submit.js") | $raw %] > <script> > function Xport() { > batches= new Array; >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 5302468dfa3..4a0804163e0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -786,7 +786,6 @@ > [% 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 %] > <script> > const LoadCheckoutsTableDelay = 0; > const AlwaysLoadCheckoutsTable = [% Koha.Preference('AlwaysLoadCheckoutsTable') | html %]; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt >index 430a0007826..7f8b2d63318 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt >@@ -162,7 +162,6 @@ > > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/tools-menu.js") | $raw %] >- [% Asset.js("js/form-submit.js") | $raw %] > [% INCLUDE 'datatables.inc' %] > <script> > $(document).ready(function() { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index 4d4e5f5fbc4..081cbb05bc8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -1713,7 +1713,6 @@ > [% Asset.js( "lib/codemirror/highlight.js" ) | $raw %] > [% Asset.css("lib/codemirror/highlight.css") | $raw %] > [% Asset.js( "js/mana.js" ) | $raw %] >- [% Asset.js("js/form-submit.js") | $raw %] > [% INCLUDE 'select2.inc' %] > <script> > // if the report param form has multiselects override default form submission >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 3979fad94fe..1a949d3c4b8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -1425,7 +1425,6 @@ > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'select2.inc' %] > [% Asset.js("js/holds.js") | $raw %] >- [% Asset.js("js/form-submit.js") | $raw %] > > [% SET url_biblio_params = "biblionumber=" _ biblionumbers.join("&biblionumber=") %] > [% IF multi_hold %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt >index 2163b369556..a834490ce34 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt >@@ -98,7 +98,6 @@ > [% INCLUDE 'datatables.inc' %] > [% Asset.js("js/tools-menu.js") | $raw %] > [% Asset.js("js/rotating-collections.js") | $raw %] >- [% Asset.js("js/form-submit.js") | $raw %] > [% END %] > > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >index 8e239635c36..7735f0a55f9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >@@ -719,7 +719,6 @@ > [% INCLUDE 'datatables.inc' %] > [% Asset.js( "lib/sortable/Sortable.min.js" ) | $raw %] > [% Asset.js("js/pages/stockrotation.js") | $raw %] >- [% Asset.js("js/form-submit.js") | $raw %] > <script> > var stock_rotation_items_table_settings = [% TablesSettings.GetTableSettings( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %]; > var stock_rotation_table_settings = [% TablesSettings.GetTableSettings( 'tools', 'stockrotation', 'stock_rotation', 'json' ) | $raw %]; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index 81e8a8d4da2..3199342947b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -632,7 +632,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >- [% Asset.js("js/form-submit.js") | $raw %] > [% IF print %] > <script> > $(document).ready(function () { >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >index 97952ecc04b..020557af388 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >@@ -103,7 +103,7 @@ > </script> > [% Asset.js("js/global.js") | $raw %] > <script type="module"> >- import { submit_form } from "/bootstrap/js/form-submit.js"; >+ import { submit_form } from "/opac-tmpl/bootstrap/js/form-submit.js"; > $("body").on("click", ".submit-form-link", function (e) { > e.preventDefault(); > submit_form(this); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index c0777a8bab7..dc23fea4162 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -1076,7 +1076,6 @@ > > [% INCLUDE 'opac-bottom.inc' %] > [% BLOCK jsinclude %] >- [% Asset.js("js/form-submit.js") | $raw %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] > <script> >-- >2.49.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39567
:
180669
|
180687
|
180983
|
180984
|
180985
|
180986
|
180987
|
180988
|
181235
|
182168
|
182169
|
182170
|
182171
|
182234
|
182235
|
182236
|
182237
|
182286
|
182287
| 182288 |
182289