From 3fb8940b5a572235ce4ab40329e5aee04a5cd2de Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 20 Feb 2024 15:39:51 +0100 Subject: [PATCH] Bug 36084: svc - checkout_notes - OPAC Decided to not use APIClient for OPAC, LATER. Signed-off-by: Jonathan Druart --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 4 +++- opac/svc/checkout_notes | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index a4e76ede71..f521bedf47 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -1390,7 +1390,9 @@ var ajaxData = { 'action': 'issuenote', 'issue_id': issue_id, - 'note': note + 'note': note, + csrf_token: $('meta[name="csrf-token"]').attr('content'), + op: 'cud-add_note', }; $.ajax({ diff --git a/opac/svc/checkout_notes b/opac/svc/checkout_notes index c0678db2fc..e8281d90fc 100755 --- a/opac/svc/checkout_notes +++ b/opac/svc/checkout_notes @@ -48,10 +48,10 @@ if ( $auth_status ne "ok" ) { exit 0; } if ($is_ajax) { - my $action = $query->param('action'); + my $op = $query->param('op'); # Issue Note - if ( $action eq 'issuenote' && C4::Context->preference('AllowCheckoutNotes') ) { + if ( $op eq 'cud-add_note' && C4::Context->preference('AllowCheckoutNotes') ) { my $scrubber = C4::Scrubber->new(); my $note = $query->param('note'); my $issue_id = $query->param('issue_id'); -- 2.39.5