From 0cff7ba78331da447434d756c64db330d79d737c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 8 Dec 2011 10:22:07 -0500 Subject: [PATCH] Bug 7337 - "Debarred Until" display in the opac tells patrons they are debarred until the year 9999 Content-Type: text/plain; charset="utf-8" This patch copies the debarred handling method from circulation.pl for use on opac-user.pl so that debarred dates and comments can be handled properly. I have slightly reworded the message in the OPAC and on circulation.pl to make the display of the debarred comment a little clearer. Revision adds missing handling of debarred status with regard to renewal operations. Renew links and buttons were not being hidden from debarred users. --- .../prog/en/modules/circ/circulation.tt | 4 ++-- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 16 ++++++---------- opac/opac-user.pl | 16 ++++++++++++++-- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 5627109..e3200ca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -565,12 +565,12 @@ No patron matched [% message %] [% IF ( userdebarred ) %]
  • - Restricted: Patron's account is restricted [% IF (userdebarreddate ) %] until [% userdebarreddate %] [% END %] [% IF (debarredcomment ) %]([% debarredcomment %])[% END %] + Restricted: Patron's account is restricted [% IF (userdebarreddate ) %] until [% userdebarreddate %] [% END %] [% IF (debarredcomment ) %] with the comment "[% debarredcomment %]"[% END %]
    - +
  • [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt index 0971f46..b78fc03 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -27,7 +27,7 @@ $.tablesorter.addParser({ }); $("#overduest").tablesorter(); [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %] - [% IF ( OpacRenewalAllowed ) %][% IF ( canrenew ) %]$("#renewselected").submit(function(){ + [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]$("#renewselected").submit(function(){ valid = false; $("input[type=checkbox]").each(function(){ if($(this).is(':checked')){ @@ -45,7 +45,7 @@ $.tablesorter.addParser({ $("#renewall_link").live('click',function(){ $("#renewall").submit(); }); - $("#checkoutst caption").append("
    "+_("Renew selected")+" "+_("Renew all")+"
    ");[% END %][% END %] + $("#checkoutst caption").append("
    "+_("Renew selected")+" "+_("Renew all")+"
    ");[% END %] }); //]]> @@ -92,8 +92,8 @@ $.tablesorter.addParser({ [% IF ( BORROWER_INF.flagged ) %]