]> git.koha-community.org Git - koha.git/commit
Bug 34650: Convert list toolbar delete into form POST
authorDavid Cook <dcook@prosentient.com.au>
Wed, 30 Aug 2023 00:28:53 +0000 (00:28 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 1 Sep 2023 14:07:37 +0000 (11:07 -0300)
commit5d3b7cf08949d5776b732f24cefcbe377260c281
tree5053f899a816ca9842095e67443f992d7d72f479
parentcaf962fbaa4f52bfea12acfa02671cd6920f7a53
Bug 34650: Convert list toolbar delete into form POST

This patch adds a HTML form with a CSRF token to POST the list delete,
which is triggered by a click handler on the A element. The A element
is still needed for existing style reasons.

Test plan:
0. Apply patch
1. koha-plack --reload kohadev
2. In the staff interface, add a list
3. Go into that list (e.g. virtualshelves/shelves.pl?op=view&shelfnumber=X)
4. From the toolbar click the "Edit" dropdown
5. From the dropdown try either "Edit list" or "Delete list"
6. Note no CSRF error and operation completes as expected

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt