diff options
author | Simon Rettberg | 2018-04-05 15:14:24 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-04-05 15:14:24 +0200 |
commit | eec1535a508a6c20832037802f2a70b49c5179d4 (patch) | |
tree | 9047f03c3901e2c8b82cf2094598eca033192105 /modules-available/news/templates | |
parent | [locationinfo] Fix default setting for "select" backend options (diff) | |
download | slx-admin-eec1535a508a6c20832037802f2a70b49c5179d4.tar.gz slx-admin-eec1535a508a6c20832037802f2a70b49c5179d4.tar.xz slx-admin-eec1535a508a6c20832037802f2a70b49c5179d4.zip |
[news] Ask for confirmation when deleting entry
Diffstat (limited to 'modules-available/news/templates')
-rw-r--r-- | modules-available/news/templates/page-news.html | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules-available/news/templates/page-news.html b/modules-available/news/templates/page-news.html index fde95781..b22b44f5 100644 --- a/modules-available/news/templates/page-news.html +++ b/modules-available/news/templates/page-news.html @@ -57,7 +57,7 @@ </td> <td class="text-center"> <input type="hidden" name="news-type" value="news"> - <button {{perms.news.delete.disabled}} class="btn btn-danger btn-xs" type="submit" name="newsid" value="{{newsid}}"><span class="glyphicon glyphicon-trash"></span></button> + <button {{perms.news.delete.disabled}} class="btn btn-danger btn-xs btn-delete" type="submit" name="newsid" value="{{newsid}}"><span class="glyphicon glyphicon-trash"></span></button> </td> </tr> {{/list}} @@ -108,7 +108,7 @@ </td> <td class="text-center"> <input type="hidden" name="news-type" value="help"> - <button {{perms.help.delete.disabled}} class="btn btn-danger btn-xs" type="submit" name="newsid" value="{{newsid}}"><span class="glyphicon glyphicon-trash"></span></button> + <button {{perms.help.delete.disabled}} class="btn btn-danger btn-xs btn-delete" type="submit" name="newsid" value="{{newsid}}"><span class="glyphicon glyphicon-trash"></span></button> </td> </tr> {{/listHelp}} @@ -130,5 +130,10 @@ document.addEventListener("DOMContentLoaded", function () { } }); $('.summernote[readonly]').each(function() { $(this).summernote('disable'); }); + $('.btn-delete').click(function (event) { + if (confirm('{{lang_confirmDelete}}')) + return; + event.preventDefault(); + }); }, false); // --></script>
\ No newline at end of file |