From ecbb2f9a526f919d4d61c500448aded05ed6e199 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 16 Feb 2024 13:32:30 +0000 Subject: [PATCH] Bug 34478: Item type deletion - correct delete_confirm and delete_confirmed "delete_confirm" is a GET operation leading to a confirmation page, where "cud-delete_confirmed" should submit a POST to delete. Signed-off-by: Jonathan Druart --- admin/itemtypes.pl | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index 698a0c00dc..684f9377db 100755 --- a/admin/itemtypes.pl +++ b/admin/itemtypes.pl @@ -173,7 +173,7 @@ if ( $op eq 'add_form' ) { $searchfield = ''; $op = 'list'; - } elsif ( $op eq 'cud-delete_confirm' ) { + } elsif ( $op eq 'delete_confirm' ) { my $itemtype = Koha::ItemTypes->find($itemtype_code); my $can_be_deleted = $itemtype->can_be_deleted(); if ($can_be_deleted == 0) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt index adeeb6865c..b9ea060e30 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -23,7 +23,7 @@ [% tx("Confirm deletion of item type '{item_type}'?", { item_type = itemtype.itemtype }) | html %] [% END %] › [% END %] - [% IF op == 'delete_confirmed' %] + [% IF op == 'cud-delete_confirmed' %] [% t("Data deleted") | html %] › [% END %] [% t("Item types") | html %] › -- 2.39.5