From 6ca12c8a72628fbb4b1f968d249232a573375468 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 8 Mar 2016 11:07:43 +0000 Subject: [PATCH] Bug 15868: Ask for confirmation when deleting a MMT action Test plan: Create marc modification template Add an action Delete it With this patch you must get a confirmation mesg Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com --- .../prog/en/js/marc_modification_templates.js | 9 ++++++--- .../prog/en/modules/tools/marc_modification_templates.tt | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/marc_modification_templates.js b/koha-tmpl/intranet-tmpl/prog/en/js/marc_modification_templates.js index 185afa89fc..9353637052 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/marc_modification_templates.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/marc_modification_templates.js @@ -185,9 +185,12 @@ function clearFormElements(divId) { } +function confirmDeleteAction() { + return confirm( MSG_MMT_CONFIRM_DEL_TEMPLATE_ACTION ); +} + function confirmDelete() { - var agree = confirm( MSG_MMT_CONFIRM_DEL_TEMPLATE ); - return agree; + return confirm( MSG_MMT_CONFIRM_DEL_TEMPLATE ); } var modaction_legend_innerhtml; @@ -285,4 +288,4 @@ function setSelectByValue( selectId, value ) { s.selectedIndex = i; } } -} \ No newline at end of file +} 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 e621de2bef..10866709e5 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 @@ -11,7 +11,8 @@ var MSG_MMT_SOURCE_FIELD = _("The source field should be filled."); var MSG_MMT_EVERY = _("Every"); var MSG_MMT_ALL = _("All"); - var MSG_MMT_CONFIRM_DEL_TEMPLATE= _("Are you sure you wish to delete this template?"); + var MSG_MMT_CONFIRM_DEL_TEMPLATE = _("Are you sure you wish to delete this template?"); + var MSG_MMT_CONFIRM_DEL_TEMPLATE_ACTION = _("Are you sure you wish to delete this template action?"); var MSG_MMT_EDIT_ACTION = _("Edit action %s"); var MSG_MMT_UPDATE_ACTION = _("Update action"); //]]> @@ -162,7 +163,7 @@ "[% 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