From 6ed291c842269c67a3b4b78415548faca984608e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 7 Feb 2024 15:34:07 +0100 Subject: [PATCH] Bug 34478: Add 'op' to admin/smart-rules Signed-off-by: Jonathan Druart --- admin/clone-rules.pl | 3 ++- koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/clone-rules.pl b/admin/clone-rules.pl index 6700055bcf..12d90bceeb 100755 --- a/admin/clone-rules.pl +++ b/admin/clone-rules.pl @@ -41,13 +41,14 @@ my ($template, $loggedinuser, $cookie) flagsrequired => {parameters => 'manage_circ_rules'}, }); +my $op = $input->param("op") || q{}; my $frombranch = $input->param("frombranch"); my $tobranch = $input->param("tobranch"); $template->param(frombranch => $frombranch) if ($frombranch); $template->param(tobranch => $tobranch) if ($tobranch); -if ($frombranch && $tobranch && $frombranch ne $tobranch) { +if ($op eq 'cud-clone' && $frombranch && $tobranch && $frombranch ne $tobranch) { $frombranch = ( $frombranch ne '*' ? $frombranch : undef ); $tobranch = ( $tobranch ne '*' ? $tobranch : undef ); 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 74127eb602..7dec803c08 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 @@ -98,6 +98,7 @@ + [% END %] -- 2.39.5