From 6c48c6436d91901a4988655dfb599f24c375bbbf Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 15 Jan 2016 18:20:09 +0000 Subject: [PATCH] Bug 15375 [QA Followup] - Fix non-functional restriction message and date Signed-off-by: Kyle M Hall --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 4 ++-- opac/opac-reserve.pl | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index 49f8863..de7e3e8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -40,8 +40,8 @@ [% IF ( debarred ) %]
  • Your account has been frozen. - [% IF ( BORROWER_INF.debarredcomment ) %] Comment: "[% BORROWER_INF.debarredcomment %]"[% END %] - [% IF ( BORROWER_INF.userdebarreddate ) %] End date: [% BORROWER_INF.userdebarreddate | $KohaDates %][% END %] + [% IF debarred_comment %] Comment: "[% debarred_comment %]"[% END %] + [% IF debarred_date && debarred_date != '9999-12-31' %] End date: [% debarred_date | $KohaDates %][% END %]
    Usually the reason for freezing an account is old overdues or damage fees. If shows your account to be clear, please contact the library. Go to your account page
  • [% END %] diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index 60232cc..277b2fe 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -314,6 +314,7 @@ if ( $borr->{'amountoutstanding'} && ($borr->{'amountoutstanding'} > $maxoutstan $noreserves = 1; $template->param( too_much_oweing => $amount ); } + if ( $borr->{gonenoaddress} && ($borr->{gonenoaddress} == 1) ) { $noreserves = 1; $template->param( @@ -321,6 +322,7 @@ if ( $borr->{gonenoaddress} && ($borr->{gonenoaddress} == 1) ) { GNA => 1 ); } + if ( $borr->{lost} && ($borr->{lost} == 1) ) { $noreserves = 1; $template->param( @@ -328,11 +330,14 @@ if ( $borr->{lost} && ($borr->{lost} == 1) ) { lost => 1 ); } + if ( IsDebarred($borrowernumber) ) { $noreserves = 1; $template->param( - message => 1, - debarred => 1 + message => 1, + debarred => 1, + debarred_comment => $borr->{debarredcomment}, + debarred_date => $borr->{debarred}, ); } -- 2.1.4