From 65b7148da8dd825c31172fe932d4b4c14912470c 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 Signed-off-by: Martin Renvoize --- .../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 a4718b04468..9bdae0fab24 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt @@ -208,7 +208,7 @@ Add to basket [% END %] -