From d9be11d9f0ac79f470d2034a0493b828d8dbce2d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 20 Mar 2014 16:41:29 +0100 Subject: [PATCH] [PASSED QA] Bug 11975: improve the batch patron deletion code This patch tries to improve the code for the cleanborrowers.pl tool. - use KohaDates plugin and Koha::DateUtils for date management, removing a dependency on C4::Dates - replace variables step1, step2 and step3 with step - add a JavaScript check if no action if checked Test plan: - Backup your DB - Play with the Patron deletion/anonymisation tool and try to find something inconsistent. If you don't find something different, it works! Signed-off-by: Galen Charlton Signed-off-by: Kyle M Hall --- .../prog/en/modules/tools/cleanborrowers.tt | 33 +++-- tools/cleanborrowers.pl | 132 ++++++++++++++------ 2 files changed, 110 insertions(+), 55 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt index 8a14187..bd505fb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt @@ -1,5 +1,6 @@ +[% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Tools › Batch patron deletion/anonymization [% IF ( step2 ) %]› Confirm[% END %][% IF ( step3 ) %]› Finished[% END %] +Koha › Tools › Batch patron deletion/anonymization [% IF step == 2 %]› Confirm[% END %][% IF step == 3 %]› Finished[% END %] [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %]