@@ -, +, @@
OpacRenewalAllowed is disabled
- OpacRenewalAllowed ON and OPACFineNoRenewals ON (set to be triggered
by the test patron's fines): Logging in to the OPAC the patron should
see a warning on opac-user.pl about not being able to renew items
because of fines.
- OpacRenewalAllowed ON and OPACFineNoRenewals OFF (threshold high
enough not to trigger a block): No warning appears.
- OpacRenewalAllowed OFF and OPACFineNoRenewals ON: No warning appears.
- OpacRenewalAllowed OFF and OPACFineNoRenewals OFF: No warning appears.
---
koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 2 --
opac/opac-user.pl | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
@@ -112,8 +112,6 @@ $.tablesorter.addParser({
[% END %]
[% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
Please note: Since you have [% IF renewal_blocked_fines != "0.00" %] more than [% renewal_blocked_fines %] in [% END %] fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.
- [% ELSIF ( renewal_blocked_fines ) %]
- Please note: You currently owe [% renewal_blocked_fines_amountoutstanding %] in fines. Please pay your fines if you wish to renew your books.
[% END %]
[% END %]
--- a/opac/opac-user.pl
+++ a/opac/opac-user.pl
@@ -105,7 +105,7 @@ if ( 5 >= $borr->{'amountoutstanding'} && $borr->{'amountoutstanding'} > 0 ) {
my $no_renewal_amt = C4::Context->preference( 'OPACFineNoRenewals' );
$no_renewal_amt ||= 0;
-if ( $borr->{amountoutstanding} > $no_renewal_amt ) {
+if ( C4::Context->preference( 'OpacRenewalAllowed' ) && $borr->{amountoutstanding} > $no_renewal_amt ) {
$borr->{'flagged'} = 1;
$canrenew = 0;
$template->param(
--