Require confirmation when deleting a comment
This commit is contained in:
parent
07beb3c1fb
commit
5d2d883dd3
2 changed files with 2 additions and 1 deletions
|
|
@ -5,7 +5,7 @@
|
||||||
%li.comment.posted{:id => comment.guid, :class => ("hidden" if(defined? hidden))}
|
%li.comment.posted{:id => comment.guid, :class => ("hidden" if(defined? hidden))}
|
||||||
- if current_user && (current_user.owns?(comment) || current_user.owns?(post))
|
- if current_user && (current_user.owns?(comment) || current_user.owns?(post))
|
||||||
.right.controls
|
.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)
|
= person_image_link(comment.author, :size => :thumb_small)
|
||||||
.content
|
.content
|
||||||
%span.from
|
%span.from
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ Feature: commenting
|
||||||
And I press "Comment"
|
And I press "Comment"
|
||||||
And I wait for the ajax to finish
|
And I wait for the ajax to finish
|
||||||
When I hover over the ".comment.posted"
|
When I hover over the ".comment.posted"
|
||||||
|
And I preemptively confirm the alert
|
||||||
And I click to delete the first comment
|
And I click to delete the first comment
|
||||||
And I wait for the ajax to finish
|
And I wait for the ajax to finish
|
||||||
And I wait for 2 seconds
|
And I wait for 2 seconds
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue