From 28e26db973d8183e0bf2441c43422c3cadbc89bc Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Wed, 11 Oct 2017 13:41:27 +0000 Subject: [PATCH] Bug 19029 - Followup: Make security question appear on clone operations from one library to another Sponsored-By: Catalyst IT --- koha-tmpl/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 d499c6e..bfec588 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.1.4