@@ -, +, @@
---
.../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(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
+++ a/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 %]
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
+++ a/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("");[% END %][% END %]
+ $("#checkoutst caption").append("");[% END %]
});
//]]>
@@ -92,8 +92,8 @@ $.tablesorter.addParser({
[% IF ( BORROWER_INF.flagged ) %]
[% END %]
- [% END %]
[% ELSE %]
You have nothing checked out |
--- a/opac/opac-user.pl
+++ a/opac/opac-user.pl
@@ -30,6 +30,7 @@ use C4::Members;
use C4::Members::AttributeTypes;
use C4::Members::Attributes qw/GetBorrowerAttributeValue/;
use C4::Output;
+use C4::Overdues qw/CheckBorrowerDebarred/;
use C4::Biblio;
use C4::Items;
use C4::Dates qw/format_date/;
@@ -78,7 +79,18 @@ for (qw(dateenrolled dateexpiry dateofbirth)) {
}
$borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} );
-if ( $borr->{'debarred'} || $borr->{'gonenoaddress'} || $borr->{'lost'} ) {
+my $debar = CheckBorrowerDebarred($borrowernumber);
+my $userdebarred;
+
+if ($debar) {
+ $userdebarred = 1;
+ $template->param( 'userdebarred' => $userdebarred );
+ if ( $debar ne "9999-12-31" ) {
+ $borr->{'userdebarreddate'} = C4::Dates::format_date($debar);
+ }
+}
+
+if ( $userdebarred || $borr->{'gonenoaddress'} || $borr->{'lost'} ) {
$borr->{'flagged'} = 1;
}
@@ -104,7 +116,6 @@ if ( $borr->{'amountoutstanding'} < 0 ) {
}
$borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'};
-$borr->{'debarred'} = C4::Dates->new($borr->{'debarred'},'iso')->output;
my @bordat;
$bordat[0] = $borr;
@@ -127,6 +138,7 @@ $template->param( BORROWER_INFO => \@bordat,
OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0,
surname => $borr->{surname},
showname => $borr->{showname},
+
);
#get issued items ....
--