From 059e598f388bd99d998e69e30515b419518e31cb Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 21 Jun 2023 17:24:20 +0000 Subject: [PATCH] Bug 34085: Remove the use of event attributes from basket groups template This patch removes the use of event attributes (onclick, onsubmit) from the basket groups template. These events are defined now along with the other in-page JS. This change allows us to move the scripts to the bottom of the page. Unrelated changes: There was no confirmation tied to the process of deleting a basket group. I've added one. And there were several "MSG_" variables defined which were unused and have been removed. To test you should have at least one vendor with at least one basket group. - Apply the patch and go to Acquisitions. - Locate a vendor with an associated basket group. - Edit a basketgroup - Confirm that editing works correctly (leaving "Close basket group" unchecked") - Confirm that editing works correctly with "Close basket group" checked. - In the list of closed basket groups, confirm that all the controls work correctly. - Create an empty basket group and confirm that clicking the associated "Delete" button in the list of basket groups triggers a confirmation, "Are you sure you want to delete this basket group?" Test that both confirming and cancelling work correctly. Signed-off-by: David Cook Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/acqui/basketgroup.tt | 197 ++++++++++-------- 1 file changed, 105 insertions(+), 92 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt index 15848daeae..110bc863a4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -4,100 +4,15 @@ [% USE Price %] [% USE Koha %] [% PROCESS 'i18n.inc' %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] [% FILTER collapse %] [% tx("Basket grouping for '{vendor}'", { vendor = booksellername }) %] › [% t("Koha") | html %] [% END %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - - + [% WRAPPER 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] @@ -205,7 +120,7 @@ [% ELSE %]
[% END %] -
+
    [% UNLESS (closedbg) %] @@ -363,10 +278,10 @@ [% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %] [% basketgroup.basketsqty | html %] - + [% UNLESS basketgroup.basketsqty %] -
    +
    [% END %] @@ -410,7 +325,7 @@
    [% IF Koha.Preference('EDIFACT') %] [% IF (ediaccount) %] -
    +
    [% ELSE %]
    No EDIFACT configuration for [% booksellername | html %]
    [% END %] @@ -437,4 +352,102 @@
- [% INCLUDE 'intranet-bottom.inc' %] + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + +[% END %] +[% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5