From 74d78f14a0fc44bbb6fee8faf2e296c88472f2ca Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 5 Dec 2017 10:23:09 -0300 Subject: [PATCH] Bug 19444: Display error message for auto_account_expired Signed-off-by: Claire Gravely Signed-off-by: Julian Maurice Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens (cherry picked from commit 439a3f43b67be872ace052d9d9aeb8f6ced1c053) Signed-off-by: Fridolin Somers --- .../intranet-tmpl/prog/en/includes/strings.inc | 1 + .../intranet-tmpl/prog/en/modules/circ/renew.tt | 14 +++++++++++++- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 7 +++++++ .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 3 +++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc index 82ff7753ab..e116204cdc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc @@ -19,6 +19,7 @@ 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_ACCOUNT_EXPIRED = _("Automatic renewal failed, account expired"); 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/en/modules/circ/renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt index dbcc09688d..e73ca7819e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt @@ -90,7 +90,19 @@ [% END %] - [% ELSIF error == "auto_renew" or error == "auto_too_much_oweing" %] + [% ELSIF error == "auto_account_expired" %] + +

[% item.biblio.title %] [% item.biblioitem.subtitle %] ( [% item.barcode %] ) has been scheduled for automatic renewal and cannot be renewed because the patron's account is expired

+ + [% IF Koha.Preference('AllowRenewalLimitOverride') %] +
+ + + +
+ [% END %] + + [% ELSIF error == "auto_renew" or error == "auto_too_much_oweing" or error == "auto_account_expired" %]

[% item.biblio.title %] [% item.biblioitem.subtitle %] ( [% item.barcode %] ) has been scheduled for automatic renewal.

diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js index 9ec8d43ece..4488af9d74 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -381,6 +381,13 @@ $(document).ready(function() { + NOT_RENEWABLE_AUTO_TOO_MUCH_OWEING + ""; + span_style = "display: none"; + span_class = "renewals-allowed"; + } else if ( oObj.can_renew_error == "auto_account_expired" ) { + content += "" + + NOT_RENEWABLE_AUTO_ACCOUNT_EXPIRED + + ""; + span_style = "display: none"; span_class = "renewals-allowed"; } else if ( oObj.can_renew_error == "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 074b9c576b..88f8457f91 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -294,6 +294,9 @@ Using this account is not recommended because some parts of Koha will not functi [% ELSIF ISSUE.auto_too_much_oweing %] Automatic renewal failed, you have unpaid fines. ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) + [% ELSIF ISSUE.auto_account_expired %] + Automatic renewal failed, your account is expired. + ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %] Automatic renewal ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) -- 2.39.5