From 57067e845552c3e377ddfae88ea900d40eb6b513 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 7 Feb 2024 15:42:40 +0100 Subject: [PATCH] Bug 36017: Remove dead code in admin/clone-rules Since commit 61628c97c245e72c750b61d9df6fa9b9100f3093 Bug 18936: (follow-up) Add cloning of circulation rules back to Koha There are some dead code in admin/clone-rules. "result" is always passed to the template. Test plan: Confirm the above and that cloning rules from the circ rules page still works correctly. Signed-off-by: Owen Leonard --- admin/clone-rules.pl | 3 -- .../prog/en/modules/admin/clone-rules.tt | 52 ++++--------------- 2 files changed, 10 insertions(+), 45 deletions(-) diff --git a/admin/clone-rules.pl b/admin/clone-rules.pl index 9dc78d8094..6700055bcf 100755 --- a/admin/clone-rules.pl +++ b/admin/clone-rules.pl @@ -59,8 +59,5 @@ if ($frombranch && $tobranch && $frombranch ne $tobranch) { $template->param(error => 1); } -$template->param(result => 1); - - output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt index c3c1eefeef..8d6c09e371 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt @@ -37,49 +37,17 @@
[% INCLUDE 'messages.inc' %] -

Cloning circulation and fine rules - [% IF frombranch == "*" %] from standard rules[% ELSIF frombranch %] from "[% Branches.GetName( frombranch ) | html %]"[% END %] - [% IF tobranch %] to "[% Branches.GetName( tobranch ) | html %]"[% END %] -

+

Cloning circulation and fine rules + [% IF frombranch == "*" %] from standard rules[% ELSIF frombranch %] from "[% Branches.GetName( frombranch ) | html %]"[% END %] + [% IF tobranch %] to "[% Branches.GetName( tobranch ) | html %]"[% END %] +

- [% IF ( result ) %] - [% IF ( error ) %] -
Cloning of circulation and fine rules failed!
- [% ELSE %] -

The rules have been cloned.

- [% END %] - Return to circulation and fine rules - [% ELSE %] - -

Use carefully! If the destination library already has circulation and fine rules, they will be deleted without warning!

-
- [% UNLESS ( frombranch ) %] -
- Please choose a library to clone rules from: - - - [% IF ( tobranch ) %][% END %] -
- [% END %] - - [% UNLESS ( tobranch ) %] -
- Please choose the library to clone the rules to: - - - [% IF ( frombranch ) %][% END %] -
- [% END %] - -
- - [% END %] + [% IF ( error ) %] +
Cloning of circulation and fine rules failed!
+ [% ELSE %] +

The rules have been cloned.

+ [% END %] + Return to circulation and fine rules
-- 2.30.2