]> git.koha-community.org Git - koha.git/commit
Bug 37039: Update discharge request with CSRF token
authorOwen Leonard <oleonard@myacpl.org>
Wed, 5 Jun 2024 18:06:04 +0000 (18:06 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 27 Jun 2024 21:53:21 +0000 (21:53 +0000)
commit3ab750f9a692fa468f349ab9b14537e84bb821b4
tree734549ad59bf6b4b5fa093a829a55fbfd2c4b63b
parent5cd540f499b435697fc7bd19df1a62b7e66d86b8
Bug 37039: Update discharge request with CSRF token

The OPAC discharge page used a link with a GET parameter, but the script
expects a POST request. This patch converts the link to a form with CSRF
token included.

To test, apply the patch and enable the useDischarge system preference
if necessary.

- Log in to the OPAC as a user with no checkouts or outstanding fees.
- Click the "Ask for discharge" tab in the sidebar of the user summary
  page.
- Click the "Ask for a discharge" button.
- You should be redirected to a page that says "Your discharge request
  has been sent."

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 67cedc9955f50c4d51b2e9a1f68ab0cac8e9a44f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt