From 0ad208369eb8f443863a278b00e9b59af3b4a2bf Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 2 Sep 2024 23:55:00 +0000 Subject: [PATCH] Bug 31632: (follow-up) CSRF protection for linking order to suggestion Signed-off-by: Andrew Fuerste Henry Signed-off-by: Emily Lamancusa --- acqui/newordersuggestion.pl | 2 +- .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 3 ++- .../prog/en/modules/acqui/newordersuggestion.tt | 12 ++++++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/acqui/newordersuggestion.pl b/acqui/newordersuggestion.pl index 33fb3fc8d96..429b6702f7d 100755 --- a/acqui/newordersuggestion.pl +++ b/acqui/newordersuggestion.pl @@ -129,7 +129,7 @@ if ( $op eq 'connectDuplicate' ) { ConnectSuggestionAndBiblio( $suggestionid, $duplicateNumber ); } -if ( $op eq 'link_order' and $link_order ) { +if ( $op eq 'cud-link_order' and $link_order ) { my $order = Koha::Acquisition::Orders->find($link_order); my $suggestion = Koha::Suggestions->find($suggestionid); $suggestion->update( { biblionumber => $order->biblionumber } ) if $order->biblionumber; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index a640a31c716..509bd59dafc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -738,7 +738,7 @@
[% END %] [% UNLESS ( books_loo.suggestionid ) %] - [% tp('verb', 'Link suggestion') | html %] + [% tp('verb', 'Link suggestion') | html %] [% END %] [% END %] @@ -1026,6 +1026,7 @@ [% Asset.js("js/form-submit.js") | $raw %] [% INCLUDE 'datatables.inc' %] [% Asset.js("js/acq.js") | $raw %] + [% Asset.js("js/form-submit.js") | $raw %] [% INCLUDE 'calendar.inc' %]