]> git.koha-community.org Git - koha.git/commit
Bug 37206: Removing an item from a label batch should be a CSRF-protected POST operation
authorOwen Leonard <oleonard@myacpl.org>
Fri, 28 Jun 2024 13:06:43 +0000 (13:06 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Tue, 2 Jul 2024 15:20:38 +0000 (17:20 +0200)
commita964d98dc85499b1ea0839ee6822cd2c553cadc3
tree3256ed76f4d6cd1d058ce815ac8541979b1e98b6
parentedc5caf976d2fe3348c890c90e980e296f6ac92c
Bug 37206: Removing an item from a label batch should be a CSRF-protected POST operation

This patch updates the label batch edit template so that removing a
single or multiple items from a batch is a CSRF-protected POST
operation.

The patch also removes the existing "if ($op eq 'cud-delete') {" section
of label-edit-batch.pl because it was unused.

To test, apply the patch and go to Cataloging -> Labels.

- Create a label batch and add multiple items to it.
- From the list of label batches, click "Edit" on the batch you created.
- Click the "Delete" button for one of the items in the batch.
  - If you confirm, the item should be deleted.
- In the "Select" column, check multiple checkboxes.
- Click the "Remove selected items" button in the toolbar.
  - Verify that confirming this operation results in the items being
    deleted from the batch.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt
labels/label-edit-batch.pl