Skip to content
Extraits de code Groupes Projets
Valider 5d2d883d rédigé par Andrej Kacian's avatar Andrej Kacian
Parcourir les fichiers

Require confirmation when deleting a comment

parent 07beb3c1
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -5,7 +5,7 @@ ...@@ -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 ...@@ -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
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter