From 5dc392f6638b7723a95007afadb23d2872c3f19f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 9 Mar 2016 11:57:47 +0000 Subject: [PATCH] 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 Signed-off-by: Brendan A Gallagher --- .../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 06bb16adea..d78dd1fdc3 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 -- 2.39.5