Bug 36931: Fix label-item-search.pl by removing CSRF requirement

This change converts a stateless POST into a GET, so that the paging
of the label-item-search.pl results works again.

Test plan:
0. Apply the patch and restart Koha
1. Go to http://localhost:8081/cgi-bin/koha/labels/label-edit-batch.pl?op=new
2. Click "Add item(s)"
3. Add '05/01/2000' in "Added on or after date:" and click "Search"
4. Page through the results
5. Rejoice

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
David Cook 2024-05-23 06:43:40 +00:00 committed by Katrin Fischer
parent 98637f17a7
commit 9aef4be8ca
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 3 additions and 4 deletions

View File

@ -19,9 +19,8 @@
[% END %]
</h1>
<form name="f" method="post" action="/cgi-bin/koha/labels/label-item-search.pl">
[% INCLUDE 'csrf-token.inc' %]
<input type="hidden" name="op" value="cud-do_search" />
<form name="f" method="get" action="/cgi-bin/koha/labels/label-item-search.pl">
<input type="hidden" name="op" value="do_search" />
<input type="hidden" name="batch_id" value="[% batch_id | html %]" />
<input type="hidden" name="type" value="[% type | html %]" />

View File

@ -55,7 +55,7 @@ my $display_columns = [ {_add => {label => "Add Item", link_fi
{select => {label => "Select", value => "_item_number"}},
];
if ( $op eq "cud-do_search" ) {
if ( $op eq "do_search" ) {
$idx = $query->param('idx');
$ccl_textbox = $query->param('ccl_textbox');
if ( $ccl_textbox && $idx ) {