From b76f7f69ea74ba7cfd1cb763068b34c2b0272bf8 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Thu, 27 Apr 2017 16:04:54 +0000 Subject: [PATCH] Bug 18450 - Implemented check if either AllowRenewLimitOverride or AllowRenewalIfOtherItemsAvaliable were set to allow, so the user is only blocked if both of these sysprefs are set to 'Dont allow' Test plan: 1. In More->Administration->Global system preferences ensure that both the AllowRenewalLimitOverride and AllowRenewalIfOtherItemsAvaliable preferences are both set to 'Dont allow'. 2. Place a hold on an item from a patron 3. Checkout the item out to a different patron 4. Renew the item and notice the 'Cannot renew: The item is on hold for another patron' warning 5. Click the 'Override and renew' button and notice that you can bypass the hold 6. Apply patch 7. Renew the item again and notice that the message does not have a 'Override and renew' button it just has the 'Ignore and continue' button 8. Go back to More->Administration->Global system preferences and set AllowRenewalLimitOverride to 'Allow' 9. Try renewing the same item again and notice that the 'Override and renew' button is displayed 10. In systems preferences now set the AllowRenewalIfOtherItemsAvailable syspref to 'Allow' and AllowRenewalLimitOverride to 'Dont allow' and notice the 'Override and renew' button is displayed 11. Now set both these sysprefs to 'Allow' and notice the 'Override and renew' button is displayed because you will not be violating these preferences. Note: Checking if the renewal exceeds the renewal level, if auto renew is set up, or if renewal is to soon is checked earlier in this conditional if statement earlier and so the check in this patch does not need to check the renewal level, auto renewal, if renewal is too soon. --- koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 73d7d8c..94cd982 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt @@ -113,6 +113,20 @@ + [% ELSIF (!(Koha.Preference('AllowRenewalLimitOverride')) && (Koha.Preference('AllowRenewalIfOtherItemsAvailable'))) %] +
+ + + + +
+ [% ELSIF ((Koha.Preference('AllowRenewalLimitOverride')) && !(Koha.Preference('AllowRenewalIfOtherItemsAvailable'))) %] +
+ + + + +
[% END %] [% ELSIF error == "patron_restricted" %] -- 2.1.4