From 5aa461267b163d4673342f871373dd0409ed4318 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 9 Mar 2016 11:57:47 +0000 Subject: [PATCH] [SIGNED-OFF] Bug 16014: Display a warning on deleting OAI sets A JavaScript alert should ask the user to confirm deletion of a OAI set. Test plan: Define a OAI set Delete it => With this patch you should get a warning Signed-off-by: Aleisha --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt index 06bb16a..d78dd1f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt @@ -16,6 +16,16 @@ function delDescField(minusButton) { var li = $(minusButton).parent('li'); $(li).remove(); } + +function confirmDelete() { + return confirm(_("Are you sure you want to delete this OAI set?")); +} + +$(document).ready(function() { + $(".delete_oai_set").on("click",function(){ + return confirmDelete(); + }); +}); //]]> @@ -104,7 +114,7 @@ function delDescField(minusButton) { Modify | - Delete + Delete | Define mappings -- 1.7.10.4