Bug 38162: Pass the rota_id correctly when deleting

To test:

1. Enable StockRotation
2. Got to Cataloging -> Stock rotation
3. Create a new Rota
4. Try to delete it
5. See the error "Can't call method "delete" on an undefined value at /kohadevbox/koha/tools/stockrotation.pl line 231"
6. APPLY PATCH
7. Try again, the rota should be deleted properly.

Signed-off-by: Laura ONeil <laura@bywatersolutions.com>
Signed-off-by: Alyssa <alyssa.drake@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit dd4822e400)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2024-10-12 14:28:57 +00:00
parent d59cc9176c
commit 491ad084ba
1 changed files with 2 additions and 2 deletions

View File

@ -407,10 +407,10 @@
[% END %]
[% END %]
<p>
<form id="delete_rota_[% rota.rota_id | html %]" method="post" action="/cgi-bin/koha/tools/stockrotation.pl">
<form id="delete_rota_[% rota_id | html %]" method="post" action="/cgi-bin/koha/tools/stockrotation.pl">
[% INCLUDE 'csrf-token.inc' %]
<input type="hidden" name="op" value="cud-delete_rota" />
<input type="hidden" name="rota_id" value="[% rota.rota_id | html %]" />
<input type="hidden" name="rota_id" value="[% rota_id | html %]" />
<button class="btn btn-default btn-xs approve" type="submit"><i class="fa fa-fw fa-check"></i> Yes</button>
</form>
<a class="btn btn-default btn-xs deny" href="/cgi-bin/koha/tools/stockrotation.pl"><i class="fa fa-fw fa-times"></i> No</a>