Bug 36597: Fix deletion of circulation desks broken by CSRF

Our CSRF work introduced a problem with deleting circulation desks: The
"delete_confirm" does not need "cud-" because it's a GET operation
leading to a POSTed deletion after the confirmation is submitted.

To test, apply the patch and restart services.

- Go to Administration -> Circulation desks.
- If necessary, create a circulation desk.
- Click the "Delete" button for you new desk.
- You should be taken to a confirmation page which shows details of the
  desk you're deleting.
- Confirming the deletion should result in deletion of the desk.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Owen Leonard 2024-04-12 12:31:15 +00:00 committed by Katrin Fischer
parent e26fc0a3d5
commit a81c98e1ea
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -82,7 +82,7 @@ if ( $op eq 'add_form' ) {
}
$searchfield = q||;
$op = 'list';
} elsif ( $op eq 'cud-delete_confirm' ) {
} elsif ( $op eq 'delete_confirm' ) {
my $desk = Koha::Desks->find($desk_id);
$template->param( desk => $desk, );
} elsif ( $op eq 'cud-delete_confirmed' ) {