From e51909d4fcc9b702cbcd08cee286f83edef468d2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 20 Mar 2014 16:41:29 +0100 Subject: [PATCH] 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 --- .../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' %]