Require confirmation when deleting a comment

This commit is contained in:
Andrej Kacian 2011-08-26 20:24:04 +02:00
parent 07beb3c1fb
commit 5d2d883dd3
2 changed files with 2 additions and 1 deletions

View file

@ -5,7 +5,7 @@
%li.comment.posted{:id => comment.guid, :class => ("hidden" if(defined? hidden))}
- if current_user && (current_user.owns?(comment) || current_user.owns?(post))
.right.controls
= link_to image_tag('deletelabel.png'), post_comment_path(comment.post_id, comment), :class => "delete comment_delete", :title => t('delete')
= link_to image_tag('deletelabel.png'), post_comment_path(comment.post_id, comment), :class => "delete comment_delete", :title => t('delete'), :confirm => t('are_you_sure')
= person_image_link(comment.author, :size => :thumb_small)
.content
%span.from

View file

@ -47,6 +47,7 @@ Feature: commenting
And I press "Comment"
And I wait for the ajax to finish
When I hover over the ".comment.posted"
And I preemptively confirm the alert
And I click to delete the first comment
And I wait for the ajax to finish
And I wait for 2 seconds