Bug 34478: Changes for tools/cleanborrowers

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Marcel de Rooy 2024-02-09 10:48:12 +00:00 committed by Jonathan Druart
parent f3bd0e7ebd
commit a7525cf6b7
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0
2 changed files with 4 additions and 3 deletions

View file

@ -100,8 +100,7 @@
</ul>
</div>
<div id="step1">
<form name="f1" id="delete_patrons_form" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
[% INCLUDE 'csrf-token.inc' %]
<form name="f1" id="delete_patrons_form" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="get">
<fieldset>
<legend>Delete patrons</legend>
<h3><input id="checkborrower" type="checkbox" name="checkbox" value="borrower" /><label for="checkborrower"> Verify you want to delete patrons</label></h3>
@ -180,6 +179,7 @@
<div id="step2">
<form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
[% INCLUDE 'csrf-token.inc' %]
<input type="hidden" name="op" value="cud-delete" />
<div class="dialog alert">
<h3>Warning</h3>

View file

@ -43,6 +43,7 @@ use Koha::Patrons;
use Koha::List::Patron qw( GetPatronLists );
my $cgi = CGI->new;
my $op = $cgi->param('op') // q{};
# Fetch the parameter list as a hash in scalar context:
# * returns parameter list as tied hash ref
@ -107,7 +108,7 @@ if ( $step == 2 ) {
);
}
elsif ( $step == 3 ) {
elsif ( $op eq 'cud-delete' && $step == 3 ) {
my $do_delete = $params->{'do_delete'};
my $do_anonym = $params->{'do_anonym'};