Bugzilla – Attachment 180985 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.86 KB, created by
Emily Lamancusa (emlam)
on 2025-04-15 18:19:43 UTC
(
hide
)
Description:
Bug 39567: Remove form-submit includes from tt files
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2025-04-15 18:19:43 UTC
Size:
15.86 KB
patch
obsolete
>From 13a2b5932c5415a024a1b27efebda31ed7f2e933 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 >--- > 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? %] >- > <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 454af49caf..e5bd714eec 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 a083d41e2e..966420858a 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 fb00c76613..aebf5a2864 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 8b97922eb2..bfd8a7096f 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 82fcc24e4b..b339e59647 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 9e6e88aae8..74c7202657 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 811db7219e..f953603336 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 ad2dcc6412..c52b9ae2a2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -1230,7 +1230,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 5b93b9b4f9..b8f31a1faa 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 %] > <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 f3d076aa09..23a606946a 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 16c2b33380..c86144d82c 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 36d5fe8c59..19f4b5a8b6 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 4be3c64ac9..502fb812b7 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 %] > <script> > // if the report param form has multiselects override default form submission > if( $('#report_param_form').find('select[multiple]').length ) { >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 558b5e0d9f..88d3890150 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 2163b36955..a834490ce3 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 16629e3239..a203b6bdc6 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 ed1323169c..62f680e8c5 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 97952ecc04..020557af38 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 8a90f4de21..efd65a542f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -1073,7 +1073,6 @@ > > [% INCLUDE 'opac-bottom.inc' %] > [% BLOCK jsinclude %] >- [% Asset.js("js/form-submit.js") | $raw %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] > <script> >-- >2.34.1
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