From bb7a181b612f870e0c168dfbcbad4346a6d90628 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 27 Feb 2024 14:48:14 +0100 Subject: [PATCH] Bug 34478: Fix delete from addbiblio Signed-off-by: Jonathan Druart --- .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 10 +++++++++- koha-tmpl/intranet-tmpl/prog/js/catalog.js | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index 8c4972f1d3..494305d45c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -86,7 +86,15 @@ [% ELSIF ( biblio.subscriptions.count ) %]
  • Delete record
  • [% ELSE %] -
  • Delete record
  • +
  • +
    + [% INCLUDE 'csrf-token.inc' %] + + + +
    + Delete record +
  • [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/catalog.js b/koha-tmpl/intranet-tmpl/prog/js/catalog.js index 3972077a32..ec49ba5af7 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/catalog.js +++ b/koha-tmpl/intranet-tmpl/prog/js/catalog.js @@ -52,7 +52,7 @@ function confirm_deletion(link) { } if (is_confirmed) { $("#deletebiblio").unbind('click'); - window.location="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&biblionumber=" + biblionumber + (searchid ? "&searchid="+searchid : ""); + return $(link).siblings('form').submit(); } else { return false; } -- 2.39.5