From fbf7fb5da17ea0fd1f50892b51e6246d938223d9 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Thu, 7 Apr 2016 07:43:21 +0200 Subject: [PATCH] Bug 15868: Ask for confirmation when deleting a MMT action MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Test plan: Create marc modification template Add an action Delete it With this patch you must get a confirmation mesg Signed-off-by: Julian Maurice (cherry picked from commit 9fddbc045da2dc25389e924262bd8f6e2bc99bfd) Signed-off-by: Frédéric Demians --- .../prog/en/modules/tools/marc_modification_templates.tt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt index 56590215c4..5b90274df3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt @@ -188,9 +188,12 @@ function clearFormElements(divId) { } +function confirmDeleteAction() { + return confirm(_("Are you sure you wish to delete this template action?")); +} + function confirmDelete() { - var agree = confirm(_("Are you sure you wish to delete this template?")); - return agree; + return confirm(_("Are you sure you wish to delete this template?")); } var modaction_legend_innerhtml; @@ -436,7 +439,7 @@ function setSelectByValue( selectId, value ) { "[% ActionsLoo.conditional_regex |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]", "[% ActionsLoo.description |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]" );updateAllEvery();'>Edit - Delete + Delete [% END %] -- 2.39.5