From c163a3ad9162c3670e8affbb7ddb8eda0b510c42 Mon Sep 17 00:00:00 2001 From: Sam Lau Date: Tue, 9 Jul 2024 15:20:57 +0000 Subject: [PATCH] Bug 31921: Add confirmation modal when deleting a vendor This patch adds a new modal for confirming vendor deletion. It fixes the previous functionality, showing a confirmation modal for each vendor and appropriately handling the response. To test: 1) Visit Acquisitions home. Under where it says 'Manage orders', click the search bar to bring up the list of vendors. 2) Add a few vendors by clicking 'New' and 'Vendor'. After this, go back to the vendor search so that all the vendors are showing. 3) For each vendor, click on 'Delete vendor' and ensure the modal shows properly. 4) Attempt to delete one of the vendors. Go back to the vendor search and ensure they are deleted correctly. 5) Click on a vendor's name to go their supplier page. Make sure modal works properly and attempt to delete a vendor from here. Signed-off-by: Owen Leonard Signed-off-by: Nick Clemens --- .../prog/en/includes/acquisitions-toolbar.inc | 7 +----- .../prog/en/includes/modals/delete_vendor.inc | 23 +++++++++++++++++++ .../prog/en/modules/acqui/booksellers.tt | 6 +++-- .../prog/en/modules/acqui/supplier.tt | 2 ++ koha-tmpl/intranet-tmpl/prog/js/acq.js | 6 +++-- 5 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/modals/delete_vendor.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc index bf80bcabb4c..63171b96dd7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc @@ -23,12 +23,7 @@ [% UNLESS ( basketcount OR subscriptioncount ) %]
-
- [% INCLUDE 'csrf-token.inc' %] - - - -
+
[% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/delete_vendor.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/delete_vendor.inc new file mode 100644 index 00000000000..be4801b88f6 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/delete_vendor.inc @@ -0,0 +1,23 @@ + + \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt index 673d6d15ab0..2fc0622e469 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt @@ -201,7 +201,7 @@ Add to basket [% END %] -