From 555d0d5898faccaf0d8c4c3c39630a23089b57c2 Mon Sep 17 00:00:00 2001 From: =?utf8?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=utf8 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 scheduled 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 Signed-off-by: Chris Cormack Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- circ/renew.pl | 2 +- .../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 38a76111b0..7800fc98e8 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 3ebd00601f..46a68ea959 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 scheduled 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 scheduled for automatic renewal.

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

This item is on hold for another patron.

-- 2.39.2