diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-03-22 15:11:51 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-03-22 15:11:51 +0000 |
commit | 18c049886e0f9ad2d094f02483aea272d0e029fb (patch) | |
tree | 5259fee3aed4a3524a31309ec5a84fe905ffd5ab | |
parent | f27210d54b98ac6e3113369b6a94c50ddb5f66a5 (diff) | |
parent | 73a8088e2cc8e7d9f08facf28d23c6401fa2ce43 (diff) | |
download | gitlab-ce-18c049886e0f9ad2d094f02483aea272d0e029fb.tar.gz |
Merge branch 'delete-button-on-edit-issue-has-no-confirmation-14474' into 'master'
User has to confirm deletion of issuables
Closes #14474
See merge request !3341
-rw-r--r-- | app/views/shared/issuable/_form.html.haml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 551f0cc0b51..b01a36265f9 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -131,7 +131,8 @@ - else .pull-right - if current_user.can?(:"destroy_#{issuable.to_ability_name}", @project) - = link_to polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), method: :delete, class: 'btn btn-grouped' do + = link_to polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), data: { confirm: "#{issuable.class.name.titleize} will be removed! Are you sure?" }, + method: :delete, class: 'btn btn-grouped' do = icon('trash-o') Delete = link_to 'Cancel', namespace_project_issue_path(@project.namespace, @project, issuable), class: 'btn btn-grouped btn-cancel' |