From 74862f045b439d0e419a559ac1ff80d5d403717c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Mei=C3=9Fner?= Date: Wed, 21 May 2014 15:15:11 +0200 Subject: [PATCH] Bug 11577: Add 'auto_renew' and 'auto_too_soon' to renewal page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds the new renewal errors 'auto_renew' and 'auto_too_soon' to the renewal interface. To test: 1) Issue two items: - one with automatic renewal and no value for "No renewal before" - another with automatic renewal and a value for "No renewal before" 2) Try to renew: Home > Circulation > Renew 3) Confirm there are error messages explaining that the items have been sheduled for automatic renewal and that one of the renewals is also premature. 4) If global syspref AllowRenewalLimitOverride is set to "Allow" you should be given the option to override. Sponsored-by: Hochschule für Gesundheit (hsg), Germany --- circ/renew.pl | 2 +- .../intranet-tmpl/prog/en/modules/circ/renew.tt | 24 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/circ/renew.pl b/circ/renew.pl index 26c7bf0..5fc11fc 100755 --- a/circ/renew.pl +++ b/circ/renew.pl @@ -76,7 +76,7 @@ if ($barcode) { } } - if ( $error && ($error eq 'too_soon') ) { + if ( $error && ($error eq 'too_soon' or $error eq 'auto_too_soon') ) { $soonest_renew_date = C4::Circulation::GetSoonestRenewDate( $borrower->borrowernumber(), $item->itemnumber(), 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 3ebd006..08154e9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt @@ -66,6 +66,30 @@ [% END %] + [% ELSIF error == "auto_too_soon" %] + +

[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %] ( [% item.barcode %] ) has been sheduled for automatic renewal and cannot be renewed before [% soonestrenewdate | $KohaDates %].

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

[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %] ( [% item.barcode %] ) has been sheduled for automatic renewal.

+ + [% IF Koha.Preference('AllowRenewalLimitOverride') %] +
+ + + +
+ [% END %] + [% ELSIF error == "on_reserve" %]

This item is on hold for another patron.

-- 1.7.10.4