From cb4718ce77bef94f49e646f5f88dcc59df99f2d8 Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Thu, 26 Mar 2020 06:30:55 +0000 Subject: [PATCH] Bug 24101: (OLD CIRC RULES GUI) Add circulation rule onsite_renewalsallowed For current testing purposes this patch adds onsite renewals count to circulation rules page. We plan to block Bug 24101 by Bug 15522, so this patch will eventually be dropped. --- admin/smart-rules.pl | 3 +++ .../intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index 6bea920dd9..b7e9691868 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -98,6 +98,7 @@ if ($op eq 'delete') { hardduedate => undef, hardduedatecompare => undef, renewalsallowed => undef, + onsite_renewalsallowed => undef, renewalperiod => undef, norenewalbefore => undef, auto_renew => undef, @@ -262,6 +263,7 @@ elsif ($op eq 'add') { my $maxissueqty = strip_non_numeric($input->param('maxissueqty')); my $maxonsiteissueqty = strip_non_numeric($input->param('maxonsiteissueqty')); my $renewalsallowed = $input->param('renewalsallowed'); + my $onsite_renewalsallowed = $input->param('onsite_renewalsallowed'); my $renewalperiod = $input->param('renewalperiod'); my $norenewalbefore = $input->param('norenewalbefore'); $norenewalbefore = '' if $norenewalbefore =~ /^\s*$/; @@ -306,6 +308,7 @@ elsif ($op eq 'add') { hardduedate => $hardduedate, hardduedatecompare => $hardduedatecompare, renewalsallowed => $renewalsallowed, + onsite_renewalsallowed => $onsite_renewalsallowed, renewalperiod => $renewalperiod, norenewalbefore => $norenewalbefore, auto_renew => $auto_renew, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index 5ae3bb94e1..6e68cd47e8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -105,6 +105,7 @@ Max. suspension duration (day) Suspension charging interval Renewals allowed (count) + On-site renewals allowed (count) Renewal period No renewal before Automatic renewal @@ -143,6 +144,7 @@ [% SET maxsuspensiondays = all_rules.$c.$i.maxsuspensiondays %] [% SET suspension_chargeperiod = all_rules.$c.$i.suspension_chargeperiod %] [% SET renewalsallowed = all_rules.$c.$i.renewalsallowed %] + [% SET onsite_renewalsallowed = all_rules.$c.$i.onsite_renewalsallowed %] [% SET renewalperiod = all_rules.$c.$i.renewalperiod %] [% SET norenewalbefore = all_rules.$c.$i.norenewalbefore %] [% SET auto_renew = all_rules.$c.$i.auto_renew %] @@ -156,7 +158,7 @@ [% SET article_requests = all_rules.$c.$i.article_requests %] [% SET rentaldiscount = all_rules.$c.$i.rentaldiscount %] - [% SET show_rule = maxissueqty || maxonsiteissueqty || issuelength || lengthunit || hardduedate || hardduedatebefore || hardduedateexact || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalsallowed || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || article_requests %] + [% SET show_rule = maxissueqty || maxonsiteissueqty || issuelength || lengthunit || hardduedate || hardduedatebefore || hardduedateexact || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || onsite_renewalsallowed || renewalsallowed || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || article_requests %] [% IF show_rule %] [% SET row_count = row_count + 1 %] @@ -239,6 +241,7 @@ [% maxsuspensiondays | html %] [% suspension_chargeperiod | html %] [% renewalsallowed | html %] + [% onsite_renewalsallowed | html %] [% renewalperiod | html %] [% norenewalbefore | html %] @@ -365,6 +368,7 @@ + -- 2.17.1