Bug 19444: Display error message for auto_account_expired

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2017-12-05 10:23:09 -03:00 committed by Nick Clemens
parent 87680805dd
commit 439a3f43b6
4 changed files with 24 additions and 1 deletions

View File

@ -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 <strong>suspended</strong>");

View File

@ -90,7 +90,19 @@
</form>
[% END %]
[% ELSIF error == "auto_renew" or error == "auto_too_much_oweing" %]
[% ELSIF error == "auto_account_expired" %]
<p>[% 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</p>
[% IF Koha.Preference('AllowRenewalLimitOverride') %]
<form method="post" action="/cgi-bin/koha/circ/renew.pl">
<input type="hidden" name="barcode" value="[% item.barcode %]"/>
<input type="hidden" name="override_limit" value="1" />
<input type="submit" class="approve" value="Override and renew" />
</form>
[% END %]
[% ELSIF error == "auto_renew" or error == "auto_too_much_oweing" or error == "auto_account_expired" %]
<p>[% item.biblio.title %] [% item.biblioitem.subtitle %] ( [% item.barcode %] ) has been scheduled for automatic renewal. </p>

View File

@ -381,6 +381,13 @@ $(document).ready(function() {
+ NOT_RENEWABLE_AUTO_TOO_MUCH_OWEING
+ "</span>";
span_style = "display: none";
span_class = "renewals-allowed";
} else if ( oObj.can_renew_error == "auto_account_expired" ) {
content += "<span class='renewals-disabled'>"
+ NOT_RENEWABLE_AUTO_ACCOUNT_EXPIRED
+ "</span>";
span_style = "display: none";
span_class = "renewals-allowed";
} else if ( oObj.can_renew_error == "auto_renew" ) {

View File

@ -297,6 +297,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.
<span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
[% ELSIF ISSUE.auto_account_expired %]
Automatic renewal failed, your account is expired.
<span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
[% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %]
Automatic renewal
<span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>