]> 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)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Fri, 8 Sep 2023 09:47:28 +0000 (09:47 +0000)
commitd0a3ae57c077ef136d5e422f6b18f57a2c40dfd8
treee2214440e1ddfb41aee06910e6f9b1ea87a5ff48
parent17dcab057f82b64bdc73395851cd7ee3606c99c6
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>
(cherry picked from commit 5d3b7cf08949d5776b732f24cefcbe377260c281)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0c4fe03c2331e2fc255e955312fcd4c5c9606225)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt