Bug 15375 [QA Followup] - Fix non-functional restriction message and date
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 15 Jan 2016 18:20:09 +0000 (18:20 +0000)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Wed, 27 Jan 2016 05:25:04 +0000 (05:25 +0000)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
opac/opac-reserve.pl

index 49f8863..de7e3e8 100644 (file)
@@ -40,8 +40,8 @@
                         [% IF ( debarred ) %]
                             <li id="debarred">
                                 Your account has been frozen.
-                                [% IF ( BORROWER_INF.debarredcomment ) %] Comment: <span id="userdebarred_comment">"[% BORROWER_INF.debarredcomment %]"</span>[% END %]
-                                [% IF ( BORROWER_INF.userdebarreddate ) %] End date: <span id="userdebarred_date">[% BORROWER_INF.userdebarreddate | $KohaDates %]</span>[% END %]
+                                [% IF debarred_comment %] Comment: <span id="userdebarred_comment">"[% debarred_comment %]"</span>[% END %]
+                                [% IF debarred_date && debarred_date != '9999-12-31' %] End date: <span id="userdebarred_date">[% debarred_date | $KohaDates %]</span>[% END %]
                                 <br /><em>Usually the reason for freezing an account is old overdues or damage fees. If shows your account to be clear, please contact the library.</em> <a href="/cgi-bin/koha/opac-account.pl">Go to your account page</a>
                             </li>
                         [% END %]
index 60232cc..277b2fe 100755 (executable)
@@ -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},
     );
 }