From e4a9ea0e5e6ad9e638ecc0a86773070e32e88c9c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 20 Mar 2014 16:41:29 +0100 Subject: [PATCH] Bug 11975: Batch patron deletion code should be improved This patch tries to improve the code for the cleanborrowers.pl tool. - use KohaDates plugin and Koha::DateUtils for date management - replace variables step1, step2 and step3 with step - add a js 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! --- .../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' %]