From 038f2598f0d1f6df471712626e5de762b6550022 Mon Sep 17 00:00:00 2001
From: Aleisha Amohia <aleishaamohia@hotmail.com>
Date: Wed, 24 Aug 2016 20:51:32 +0000
Subject: [PATCH] Bug 17191: Confirm message on deleting tag in OPAC

To test:
1) Log into OPAC, go to your tags
2) Click Delete
3) Confirm message should pop up
4) Ensure clicking Cancel works as expected, ensure clicking OK works as
expected

Sponsored-by: Catalyst IT
---
 koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt
index 295c32d..ef2e2da 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt
@@ -153,7 +153,7 @@
                                                     [% MY_TAG.date_created | $KohaDates %]
                                                 </span>
                                             </td>
-                                            <td><input type="submit" name="del[% MY_TAG.tag_id %]" value="Delete" class="btn btn-danger btn-mini" /></td>
+                                            <td><input type="submit" name="del[% MY_TAG.tag_id %]" value="Delete" class="btn btn-danger btn-mini" onclick="return confirm(MSG_DELETE_TAG);" /></td>
                                         </tr>
                                     [% END %]
                                 </tbody>
@@ -171,6 +171,9 @@
 [% INCLUDE 'datatables.inc' %]
 <script type="text/javascript">
 //<![CDATA[
+
+    var MSG_DELETE_TAG = _("Are you sure you want to delete this tag?");
+
     $(document).ready(function(){
         $("#mytagst").dataTable($.extend(true, {}, dataTablesDefaults, {
             "aaSorting": [[ 2, "asc" ]],
-- 
2.1.4