From 864ec192cf46d96837319a75e95de9820ca6ed18 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 24 Oct 2016 11:43:31 +0000 Subject: [PATCH] Bug 15705: Add specific warning messages for auto_too_much_oweing --- koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc | 1 + koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 7 +++++++ koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 3 +++ opac/opac-user.pl | 1 + 4 files changed, 12 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc index 7483ccf..7560fc2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc @@ -18,6 +18,7 @@ var NOT_RENEWABLE_TOO_SOON = _("No renewal before %s"); var NOT_RENEWABLE_AUTO_TOO_SOON = _("Scheduled for automatic renewal"); var NOT_RENEWABLE_AUTO_TOO_LATE = _("Can no longer be auto-renewed - number of checkout days exceeded"); + var NOT_RENEWABLE_AUTO_TOO_MUCH_OWEING = _("Automatic renewal failed, patron has unpaid fines"); var NOT_RENEWABLE_AUTO_RENEW = _("Scheduled for automatic renewal"); var RENEWALS_REMAINING = _("%s of %s renewals remaining"); var HOLD_IS_SUSPENDED = _("Hold is suspended"); diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js index b8416c6..ff7e522 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -360,6 +360,13 @@ $(document).ready(function() { span_style = "display: none"; span_class = "renewals-allowed"; + } else if ( oObj.can_renew_error == "auto_too_much_oweing" ) { + content += "" + + NOT_RENEWABLE_AUTO_TOO_MUCH_OWEING + + ""; + + span_style = "display: none"; + span_class = "renewals-allowed"; } else if ( oObj.can_renew_error == "auto_renew" ) { content += "" + NOT_RENEWABLE_AUTO_RENEW diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index 438cb10..3b74c67 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -259,6 +259,9 @@ Using this account is not recommended because some parts of Koha will not functi Not renewable [% ELSIF ( ISSUE.norenew_overdue ) %] Not allowed (overdue) + [% ELSIF ISSUE.auto_too_much_oweing %] + Automatic renewal failed, you have unpaid fines. + ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %] Automatic renewal ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 838a573..d105c97 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -212,6 +212,7 @@ if ($issues){ $issue->{'norenew_overdue'} = 1 if $renewerror eq 'overdue'; $issue->{'auto_renew'} = 1 if $renewerror eq 'auto_renew'; $issue->{'auto_too_soon'} = 1 if $renewerror eq 'auto_too_soon'; + $issue->{'auto_too_much_oweing'} = 1 if $renewerror eq 'auto_too_much_oweing'; if ( $renewerror eq 'too_soon' ) { $issue->{'too_soon'} = 1; -- 2.1.4