Commit 74d19cc4 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #5819 from jvanbaarsen/rails4

Fixed all the confirm: deprecation warnings
parents 72f2be86 bfacf136
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
.clearfix .clearfix
.pull-right.prepend-top-10 .pull-right.prepend-top-10
= link_to 'Edit', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn btn-small" = link_to 'Edit', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn btn-small"
= link_to 'Destroy', [:admin, group], confirm: "REMOVE #{group.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove" = link_to 'Destroy', [:admin, group], data: {confirm: "REMOVE #{group.name}? Are you sure?"}, method: :delete, class: "btn btn-small btn-remove"
%h4 %h4
= link_to [:admin, group] do = link_to [:admin, group] do
......
...@@ -74,5 +74,5 @@ ...@@ -74,5 +74,5 @@
= link_to user.name, admin_user_path(user) = link_to user.name, admin_user_path(user)
%span.pull-right.light %span.pull-right.light
= member.human_access = member.human_access
= link_to group_users_group_path(@group, member), confirm: remove_user_from_group_message(@group, user), method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do = link_to group_users_group_path(@group, member), data: { confirm: remove_user_from_group_message(@group, user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do
%i.icon-minus.icon-white %i.icon-minus.icon-white
...@@ -39,4 +39,4 @@ ...@@ -39,4 +39,4 @@
= link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-small pull-right" = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-small pull-right"
%td POST %td POST
%td %td
= link_to 'Remove', admin_hook_path(hook), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove btn-small pull-right" = link_to 'Remove', admin_hook_path(hook), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-remove btn-small pull-right"
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
%span.label.label-gray %span.label.label-gray
= repository_size(project) = repository_size(project)
= link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
= link_to 'Destroy', [project], confirm: remove_project_message(project), method: :delete, class: "btn btn-small btn-remove" = link_to 'Destroy', [project], data: { confirm: remove_project_message(project) }, method: :delete, class: "btn btn-small btn-remove"
- if @projects.blank? - if @projects.blank?
%p.nothing_here_message 0 projects matches %p.nothing_here_message 0 projects matches
= paginate @projects, theme: "gitlab" = paginate @projects, theme: "gitlab"
...@@ -117,5 +117,5 @@ ...@@ -117,5 +117,5 @@
%span.light Owner %span.light Owner
- else - else
%span.light= users_project.human_access %span.light= users_project.human_access
= link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, remote: true, class: "btn btn-small btn-remove" do = link_to project_team_member_path(@project, user), data: { confirm: remove_from_project_team_message(@project, user)}, method: :delete, remote: true, class: "btn btn-small btn-remove" do
%i.icon-remove %i.icon-remove
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
= link_to 'Unblock User', unblock_admin_user_path(@user), method: :put, class: "btn btn-small" = link_to 'Unblock User', unblock_admin_user_path(@user), method: :put, class: "btn btn-small"
- else - else
%p Blocked users will be removed from all projects & will not be able to login to GitLab. %p Blocked users will be removed from all projects & will not be able to login to GitLab.
= link_to 'Block User', block_admin_user_path(@user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove" = link_to 'Block User', block_admin_user_path(@user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-small btn-remove"
%fieldset %fieldset
%legend Profile %legend Profile
.control-group .control-group
......
...@@ -53,6 +53,6 @@ ...@@ -53,6 +53,6 @@
- if user.blocked? - if user.blocked?
= link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-small success" = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-small success"
- else - else
= link_to 'Block', block_admin_user_path(user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove" = link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-small btn-remove"
= link_to 'Destroy', [:admin, user], confirm: "USER #{user.name} WILL BE REMOVED! All tickets linked to this user will also be removed! Maybe block the user instead? Are you sure?", method: :delete, class: "btn btn-small btn-remove" = link_to 'Destroy', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! All tickets linked to this user will also be removed! Maybe block the user instead? Are you sure?" }, method: :delete, class: "btn btn-small btn-remove"
= paginate @users, theme: "gitlab" = paginate @users, theme: "gitlab"
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
- if current_user.can_leave_project?(project) - if current_user.can_leave_project?(project)
.pull-right .pull-right
= link_to leave_project_team_members_path(project), confirm: "Leave project?", method: :delete, remote: true, class: "btn-tiny btn remove-row", title: 'Leave project' do = link_to leave_project_team_members_path(project), data: { confirm: "Leave project?"}, method: :delete, remote: true, class: "btn-tiny btn remove-row", title: 'Leave project' do
%i.icon-signout %i.icon-signout
Leave Leave
......
...@@ -23,6 +23,6 @@ ...@@ -23,6 +23,6 @@
<h3>Cancel my account</h3> <h3>Cancel my account</h3>
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), confirm: "Are you sure?", method: :delete %>.</p> <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %>.</p>
<%= link_to "Back", :back %> <%= link_to "Back", :back %>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
.pull-right .pull-right
= link_to 'Members', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" = link_to 'Members', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
= link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
= link_to 'Remove', project, confirm: remove_project_message(project), method: :delete, class: "btn btn-small btn-remove" = link_to 'Remove', project, data: { confirm: remove_project_message(project)}, method: :delete, class: "btn btn-small btn-remove"
- if @group.projects.blank? - if @group.projects.blank?
%p.nothing_here_message This group has no projects yet %p.nothing_here_message This group has no projects yet
...@@ -69,4 +69,4 @@ ...@@ -69,4 +69,4 @@
%p %p
%strong Removed group can not be restored! %strong Removed group can not be restored!
= link_to 'Remove Group', @group, confirm: 'Removed group can not be restored! Are you sure?', method: :delete, class: "btn btn-remove" = link_to 'Remove Group', @group, data: {confirm: 'Removed group can not be restored! Are you sure?'}, method: :delete, class: "btn btn-remove"
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
%i.icon-cogs %i.icon-cogs
Settings Settings
= link_to leave_profile_group_path(group), confirm: "Are you sure you want to leave #{group.name} group?", method: :delete, class: "btn-small btn grouped", title: 'Remove user from group' do = link_to leave_profile_group_path(group), data: { confirm: "Are you sure you want to leave #{group.name} group?"}, method: :delete, class: "btn-small btn grouped", title: 'Remove user from group' do
%i.icon-signout %i.icon-signout
Leave Leave
......
...@@ -8,4 +8,4 @@ ...@@ -8,4 +8,4 @@
= time_ago_in_words(key.created_at) = time_ago_in_words(key.created_at)
ago ago
= link_to 'Remove', profile_key_path(key), confirm: 'Are you sure?', method: :delete, class: "btn btn-small btn-remove delete-key pull-right" = link_to 'Remove', profile_key_path(key), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-small btn-remove delete-key pull-right"
...@@ -19,4 +19,4 @@ ...@@ -19,4 +19,4 @@
= @key.key = @key.key
.pull-right .pull-right
= link_to 'Remove', profile_key_path(@key), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove delete-key" = link_to 'Remove', profile_key_path(@key), data: {confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove delete-key"
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
.light The maximum file size allowed is 100KB. .light The maximum file size allowed is 100KB.
- if @user.avatar? - if @user.avatar?
%hr %hr
= link_to 'Remove avatar', profile_avatar_path, confirm: "Avatar will be removed. Are you sure?", method: :delete, class: "btn btn-remove btn-small remove-avatar" = link_to 'Remove avatar', profile_avatar_path, data: { confirm: "Avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-small remove-avatar"
.form-actions .form-actions
= f.submit 'Save changes', class: "btn btn-save" = f.submit 'Save changes', class: "btn btn-save"
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
%i.icon-off %i.icon-off
Disable Disable
- else - else
= link_to 'Remove', project_deploy_key_path(@project, deploy_key), confirm: 'You are going to remove deploy key. Are you sure?', method: :delete, class: "btn btn-remove delete-key btn-small pull-right" = link_to 'Remove', project_deploy_key_path(@project, deploy_key), data: { confirm: 'You are going to remove deploy key. Are you sure?'}, method: :delete, class: "btn btn-remove delete-key btn-small pull-right"
= link_to project_deploy_key_path(deploy_key.projects.include?(@project) ? @project : deploy_key.projects.first, deploy_key) do = link_to project_deploy_key_path(deploy_key.projects.include?(@project) ? @project : deploy_key.projects.first, deploy_key) do
......
...@@ -10,4 +10,4 @@ ...@@ -10,4 +10,4 @@
%hr %hr
%pre= @key.key %pre= @key.key
.pull-right .pull-right
= link_to 'Remove', project_deploy_key_path(@project, @key), confirm: 'Are you sure?', method: :delete, class: "btn-remove btn delete-key" = link_to 'Remove', project_deploy_key_path(@project, @key), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn-remove btn delete-key"
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
%br %br
%strong Removed projects cannot be restored! %strong Removed projects cannot be restored!
= link_to 'Remove project', @project, confirm: remove_project_message(@project), method: :delete, class: "btn btn-remove" = link_to 'Remove project', @project, data: { confirm: remove_project_message(@project) }, method: :delete, class: "btn btn-remove"
- else - else
%p.nothing_here_message Only project owner can remove a project %p.nothing_here_message Only project owner can remove a project
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
%strong= @ref %strong= @ref
%span.options %span.options
.btn-group.tree-btn-group .btn-group.tree-btn-group
= link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-tiny btn-cancel", confirm: leave_edit_message = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-tiny btn-cancel", data: { confirm: leave_edit_message }
.file-content.code .file-content.code
%pre#editor= @blob.data %pre#editor= @blob.data
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
.message .message
to branch to branch
%strong= @ref %strong= @ref
= link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-cancel", confirm: leave_edit_message = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-cancel", data: { confirm: leave_edit_message}
:javascript :javascript
ace.config.set("modePath", gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}/ace-src-noconflict") ace.config.set("modePath", gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}/ace-src-noconflict")
......
...@@ -44,4 +44,4 @@ ...@@ -44,4 +44,4 @@
- if can? current_user, :remove_project, @project - if can? current_user, :remove_project, @project
.prepend-top-20 .prepend-top-20
= link_to 'Remove project', @project, confirm: remove_project_message(@project), method: :delete, class: "btn btn-remove pull-right" = link_to 'Remove project', @project, data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-remove pull-right"
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
%li %li
.pull-right .pull-right
= link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn btn-small grouped" = link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn btn-small grouped"
= link_to 'Remove', project_hook_path(@project, hook), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove btn-small grouped" = link_to 'Remove', project_hook_path(@project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-small grouped"
.clearfix .clearfix
%span.monospace= hook.url %span.monospace= hook.url
%p %p
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
.message .message
to branch to branch
%strong= @ref %strong= @ref
= link_to "Cancel", project_tree_path(@project, @id), class: "btn btn-cancel", confirm: leave_edit_message = link_to "Cancel", project_tree_path(@project, @id), class: "btn btn-cancel", data: { confirm: leave_edit_message}
:javascript :javascript
ace.config.set("modePath", gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}/ace-src-noconflict") ace.config.set("modePath", gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}/ace-src-noconflict")
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
%i.icon-lock %i.icon-lock
.pull-right .pull-right
- if can? current_user, :admin_project, @project - if can? current_user, :admin_project, @project
= link_to 'Unprotect', [@project, branch], confirm: 'Branch will be writable for developers. Are you sure?', method: :delete, class: "btn btn-remove btn-small" = link_to 'Unprotect', [@project, branch], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-remove btn-small"
- if commit = branch.commit - if commit = branch.commit
= link_to project_commit_path(@project, commit.id), class: 'commit_short_id' do = link_to project_commit_path(@project, commit.id), class: 'commit_short_id' do
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
= link_to "Cancel", project_snippets_path(@project), class: "btn btn-cancel" = link_to "Cancel", project_snippets_path(@project), class: "btn btn-cancel"
- unless @snippet.new_record? - unless @snippet.new_record?
= link_to 'Remove snippet', project_snippet_path(@project, @snippet), confirm: 'Are you sure?', method: :delete, class: "btn pull-right btn-remove delete-snippet prepend-left-10", id: "destroy_snippet_#{@snippet.id}" = link_to 'Remove snippet', project_snippet_path(@project, @snippet), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn pull-right btn-remove delete-snippet prepend-left-10", id: "destroy_snippet_#{@snippet.id}"
:javascript :javascript
var editor = ace.edit("editor"); var editor = ace.edit("editor");
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
= form_for(member, as: :team_member, url: project_team_member_path(@project, member.user)) do |f| = form_for(member, as: :team_member, url: project_team_member_path(@project, member.user)) do |f|
= f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2 trigger-submit" = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2 trigger-submit"
&nbsp; &nbsp;
= link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from team' do = link_to project_team_member_path(@project, user), data: { confirm: remove_from_project_team_message(@project, user)}, method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from team' do
%i.icon-minus.icon-white %i.icon-minus.icon-white
= image_tag avatar_icon(user.email, 32), class: "avatar s32" = image_tag avatar_icon(user.email, 32), class: "avatar s32"
%p %p
......
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
.pull-right .pull-right
- if @wiki.persisted? && can?(current_user, :admin_wiki, @project) - if @wiki.persisted? && can?(current_user, :admin_wiki, @project)
= link_to project_wiki_path(@project, @wiki), confirm: "Are you sure you want to delete this page?", method: :delete, class: "btn btn-small btn-remove" do = link_to project_wiki_path(@project, @wiki), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-small btn-remove" do
Delete this page Delete this page
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
.btn-group.tree-btn-group.pull-right .btn-group.tree-btn-group.pull-right
- if @snippet.author == current_user - if @snippet.author == current_user
= link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet' = link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet'
= link_to "Delete", snippet_path(@snippet), method: :delete, confirm: "Are you sure?", class: "btn btn-tiny", title: 'Delete Snippet' = link_to "Delete", snippet_path(@snippet), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-tiny", title: 'Delete Snippet'
= link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank" = link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank"
- unless @snippet.content.empty? - unless @snippet.content.empty?
- if gitlab_markdown?(@snippet.file_name) - if gitlab_markdown?(@snippet.file_name)
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
- unless @snippet.new_record? - unless @snippet.new_record?
.pull-right.prepend-left-20 .pull-right.prepend-left-20
= link_to 'Remove', snippet_path(@snippet), confirm: 'Removed snippet cannot be restored! Are you sure?', method: :delete, class: "btn btn-remove delete-snippet", id: "destroy_snippet_#{@snippet.id}" = link_to 'Remove', snippet_path(@snippet), data: { confirm: 'Removed snippet cannot be restored! Are you sure?'}, method: :delete, class: "btn btn-remove delete-snippet", id: "destroy_snippet_#{@snippet.id}"
= link_to "Cancel", snippets_path(@project), class: "btn btn-cancel" = link_to "Cancel", snippets_path(@project), class: "btn btn-cancel"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment