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 <aleishaamohia@hotmail.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
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();
+ });
+});
//]]>
</script>
</head>
<td>
<a href="/cgi-bin/koha/admin/oai_sets.pl?op=mod&id=[% set.id %]">Modify</a>
|
- <a href="/cgi-bin/koha/admin/oai_sets.pl?op=del&id=[% set.id %]">Delete</a>
+ <a class="delete_oai_set" href="/cgi-bin/koha/admin/oai_sets.pl?op=del&id=[% set.id %]">Delete</a>
|
<a href="/cgi-bin/koha/admin/oai_set_mappings.pl?id=[% set.id %]">Define mappings</a>
</td>