From a70c38f38001ec34749c9f4cc38a4eef9d2ed04a Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Wed, 11 Oct 2017 13:41:27 +0000 Subject: [PATCH] Bug 19029: (follow-up) Make security question appear on clone operations from one library to another MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message pops up for all instances of cloning now. Works as expected. Signed-off-by: Dilan Johnpullé Signed-off-by: Jonathan Druart --- .../intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 d499c6e82e..bfec588251 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 @@ -37,9 +37,14 @@ $(document).ready(function() { $("#clone_rules").on("click",function(){ var library_dropdown = document.getElementById("branch"); var selected_library = library_dropdown.options[library_dropdown.selectedIndex].value; + var selected_library_text = $("#branch option:selected").text(); + var to_library = $("#tobranch option:selected").text(); + var MSG_CONFIRM_CLONE; if (selected_library === "*") { - var to_library = $("#tobranch option:selected").text(); - var MSG_CONFIRM_CLONE = _("Are you sure you want to clone this standard rule to %s library? This will override the existing rules in this library.").format(to_library); + MSG_CONFIRM_CLONE = _("Are you sure you want to clone this standard rule to %s library? This will override the existing rules in this library.").format(to_library); + return confirmClone(MSG_CONFIRM_CLONE); + } else { + MSG_CONFIRM_CLONE = _("Are you sure you want to clone this circulation and fine rule from %s to %s library? This will override the existing rules in this library.").format(selected_library_text, to_library); return confirmClone(MSG_CONFIRM_CLONE); } }); -- 2.39.5