Permalink
Browse files

Display a confirmation dialog first when deleting comments

  • Loading branch information...
1 parent 9805670 commit 3eb87eee74ff3c0f8114d483332aaa41078ee9f6 Hans-Christian Espérer committed May 3, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 modules/mod_comment/templates/admin_comments.tpl
@@ -31,7 +31,11 @@
<div class="pull-right">
{% button class="btn btn-mini" text=_"view" action={redirect location=[m.rsc[comment.rsc_id].page_url,"#comment-",id|format_integer]|join } %}
{% include "_admin_comments_toggledisplay.tpl" element=#comment.id %}
- {% button class="btn btn-mini" text=_"delete" postback={comment_delete id=id on_success={slide_fade_out target=#comment.id}} %}
+ {% button class="btn btn-mini"
+ text=_"delete"
+ action={confirm text=_"Are you sure you wish to delete that comment?"
+ action={postback delegate="resource_admin_comments"
+ postback={comment_delete id=id on_success={slide_fade_out target=#comment.id}}}} %}
</div>
{% if comment.user_id %}
{{ m.rsc[comment.user_id].title }} (#{{ comment.user_id }})

0 comments on commit 3eb87ee

Please sign in to comment.