From 831a464587910420eeacb597d53284e1e2405da4 Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Tue, 31 Mar 2020 12:19:28 +0300 Subject: [PATCH 3/5] Bug 23415: Use OPACFineNoRenewals instead of noissuecharge Since noissuecharge is mainly fine limit for checkouts it's more logical to use value in OPACFineNoRenewals. Sponsored-by: Koha-Suomi Oy Signed-off-by: Petro Vashchuk --- circ/renew.pl | 2 +- .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 3 ++- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/circ/renew.pl b/circ/renew.pl index 06d28f1a90..f26badc86c 100755 --- a/circ/renew.pl +++ b/circ/renew.pl @@ -67,7 +67,7 @@ if ($barcode) { $borrower = $issue->patron(); my $patron = Koha::Patrons->find($borrower->borrowernumber); $balance = $patron->account->balance; - my $amountlimit = C4::Context->preference("noissuescharge"); + my $amountlimit = C4::Context->preference("OPACFineNoRenewals"); if ( ( $borrower->debarred() || q{} ) lt dt_from_string()->ymd() ) { my $can_renew; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index c74d5c9d49..091a0aa88d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -597,7 +597,8 @@ OPAC: - Only allow patrons to renew their own books on the OPAC if they have less than - pref: OPACFineNoRenewals class: currency - - '[% local_currency %] in fines (leave blank to disable).' + - '[% local_currency %] in fines (leave blank to disable). + -
NOTE: If set, confirmation dialog is shown when renewing for patron with fines from staff interface.' - - pref: OPACFineNoRenewalsIncludeCredits choices: 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 9c6c62bd90..d82fc0ecf0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1076,7 +1076,7 @@ [% UNLESS ( patron.borrowernumber ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %] - var amountlimit = "[% Koha.Preference('noissuescharge') | html %]"; + var amountlimit = "[% Koha.Preference('OPACFineNoRenewals') | html %]"; var fines = "[% fines | html %]"; var MSG_CONFRIM_RENEW = _("The patron has a debt of %s.\n Are you sure you want to renew checkout(s)?").format(fines); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 52f1f7870f..ca81da2b84 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -876,7 +876,7 @@ table_settings_issues_table = [% TablesSettings.GetTableSettings( 'members', 'moremember', 'issues-table', 'json' ) | $raw %] table_settings_relatives_issues_table = [% TablesSettings.GetTableSettings( 'members', 'moremember', 'relatives-issues-table', 'json' ) | $raw %] - var amountlimit = "[% Koha.Preference('noissuescharge') | html %]"; + var amountlimit = "[% Koha.Preference('OPACFineNoRenewals') | html %]"; var fines = "[% fines | html %]"; var MSG_CONFRIM_RENEW = _("The patron has a debt of %s.\n Are you sure you want to renew checkout(s)?").format(fines); -- 2.25.1