From a3b1e7df0bc7d49a50a7d9030a5de64ce93de22d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 17 Jan 2019 16:27:43 +0000 Subject: [PATCH] Bug 22134: (follow-up) Simplify check for expired patron This patch move the check for "is_expired" to the template and removes unnecessary code from the script. The interface should show no difference. Signed-off-by: Jack Kelliher --- koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 4 ++-- members/moremember.pl | 9 --------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 677bf45917..9a8c47a9ff 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -133,7 +133,7 @@ [% IF ( lost ) %]
  • Patron's card has been reported lost.
  • [% END %] - [% IF ( expired ) %] + [% IF ( patron.is_expired ) %]
  • Expiration: [% IF ( patron.dateexpiry ) %] @@ -439,7 +439,7 @@ Expiration date: [% IF ( was_renewed ) %] [% patron.dateexpiry | $KohaDates %] - [% ELSIF ( expired ) %] + [% ELSIF ( patron.is_expired ) %] [% patron.dateexpiry | $KohaDates %] Expired diff --git a/members/moremember.pl b/members/moremember.pl index e76dcd019b..637ea9f812 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -311,15 +311,6 @@ my $translated_language = C4::Languages::language_get_description( $subtag, $sub # if the expiry date is before today ie they have expired if ( $patron->is_expired ) { $template->param( - expired => "1", - flagged => 1 - ); -} -# check for NotifyBorrowerDeparture -elsif ( $patron->is_going_to_expire ) { - # borrower card soon to expire warn librarian - $template->param( - "warndeparture" => $patron->dateexpiry, flagged => 1 ); } -- 2.11.0