diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml
index 3780500a4473a9f321baf8917a22da2e8167dd34..b984188eb9d4db211267d18df8fb2e6f2de84ae0 100644
--- a/app/views/admin/projects/index.html.haml
+++ b/app/views/admin/projects/index.html.haml
@@ -44,7 +44,7 @@
Projects (#{@projects.total_count})
.panel-head-actions
.dropdown.inline
- %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
+ %button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
%span.light sort:
- if @sort.present?
= sort_options_hash[@sort]
diff --git a/app/views/explore/groups/index.html.haml b/app/views/explore/groups/index.html.haml
index 5cf514927af04caa68684cfa501f864ff21a6661..2ea6cb186558187b19d27566ee9143ebe291b419 100644
--- a/app/views/explore/groups/index.html.haml
+++ b/app/views/explore/groups/index.html.haml
@@ -9,7 +9,7 @@
.pull-right
.dropdown.inline
- %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
+ %button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
%span.light sort:
- if @sort.present?
= sort_options_hash[@sort]
diff --git a/app/views/explore/projects/index.html.haml b/app/views/explore/projects/index.html.haml
index 02d029127915d6599d36ab9c03bf713d644669c3..cb93b300d6ac52049f79f2ca262c00b5dc00ed05 100644
--- a/app/views/explore/projects/index.html.haml
+++ b/app/views/explore/projects/index.html.haml
@@ -8,7 +8,7 @@
.pull-right
.dropdown.inline
- %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
+ %button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
%span.light sort:
- if @sort.present?
= sort_options_hash[@sort]
diff --git a/app/views/groups/group_members/_group_member.html.haml b/app/views/groups/group_members/_group_member.html.haml
index d05016d9c3f514c1c78808cfa01548e315ce8093..21029c3a07d114d9e0a6463de513591ae9cbd253 100644
--- a/app/views/groups/group_members/_group_member.html.haml
+++ b/app/views/groups/group_members/_group_member.html.haml
@@ -14,7 +14,8 @@
%strong= member.human_access
- if show_controls
- if can?(current_user, :modify, member)
- = link_to '#', class: "btn-tiny btn js-toggle-button", title: 'Edit access level' do
+ = button_tag class: "btn-tiny btn js-toggle-button",
+ title: 'Edit access level', type: 'button' do
%i.fa.fa-pencil-square-o
- if can?(current_user, :destroy, member)
- if current_user == member.user
diff --git a/app/views/groups/members.html.haml b/app/views/groups/members.html.haml
index d2ebcdab7e1ec4a9974b2a69ffcf501c709956d5..688c22e962474d9e6c252ee6bb1af0b949a0dd4b 100644
--- a/app/views/groups/members.html.haml
+++ b/app/views/groups/members.html.haml
@@ -17,7 +17,7 @@
- if current_user && current_user.can?(:manage_group, @group)
.pull-right
- = link_to '#', class: 'btn btn-new js-toggle-button' do
+ = button_tag class: 'btn btn-new js-toggle-button', type: 'button' do
Add members
%i.fa.fa-chevron-down
diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml
index f77d02a97fb00bca1f1ad920522cf7b59ace69f4..a313ffcf27294a07dc1e6024d5c2ac2077d4f6f6 100644
--- a/app/views/projects/branches/index.html.haml
+++ b/app/views/projects/branches/index.html.haml
@@ -8,7 +8,7 @@
New branch
.dropdown.inline
- %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
+ %button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
%span.light sort:
- if @sort.present?
= @sort.humanize
diff --git a/app/views/search/_filter.html.haml b/app/views/search/_filter.html.haml
index eca69ce50b1f55840c83e487fe1b03375a404769..c635c04fb8f47dca386bf4bf01c2d050d0171666 100644
--- a/app/views/search/_filter.html.haml
+++ b/app/views/search/_filter.html.haml
@@ -1,5 +1,5 @@
.dropdown.inline
- %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
+ %button.dropdown-toggle.btn.btn-small{type: 'button', 'data-toggle' => 'dropdown'}
%i.fa.fa-tags
%span.light Group:
- if @group.present?
@@ -17,7 +17,7 @@
= group.name
.dropdown.inline.prepend-left-10.project-filter
- %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
+ %button.dropdown-toggle.btn.btn-small{type: 'button', 'data-toggle' => 'dropdown'}
%i.fa.fa-tags
%span.light Project:
- if @project.present?
diff --git a/app/views/shared/_issuable_filter.html.haml b/app/views/shared/_issuable_filter.html.haml
index 61647b09527a0d99a8e127698de71b99b6b459d1..5412b9ef0f4c12502e9c91624d69e87aa744e19f 100644
--- a/app/views/shared/_issuable_filter.html.haml
+++ b/app/views/shared/_issuable_filter.html.haml
@@ -22,7 +22,7 @@
disabled: !can?(current_user, :modify_issue, @project)
.issues-other-filters
.dropdown.inline.assignee-filter
- %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
+ %button.dropdown-toggle.btn{type: 'button', "data-toggle" => "dropdown"}
%i.fa.fa-user
%span.light assignee:
- if @assignee.present?
@@ -45,7 +45,7 @@
= user.name
.dropdown.inline.prepend-left-10.author-filter
- %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
+ %button.dropdown-toggle.btn{type: 'button', "data-toggle" => "dropdown"}
%i.fa.fa-user
%span.light author:
- if @author.present?
@@ -68,7 +68,7 @@
= user.name
.dropdown.inline.prepend-left-10.milestone-filter
- %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
+ %button.dropdown-toggle.btn{type: 'button', "data-toggle" => "dropdown"}
%i.fa.fa-clock-o
%span.light milestone:
- if @milestone.present?
@@ -92,7 +92,7 @@
- if @project
.dropdown.inline.prepend-left-10.labels-filter
- %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
+ %button.dropdown-toggle.btn{type: 'button', "data-toggle" => "dropdown"}
%i.fa.fa-tags
%span.light label:
- if params[:label_name].present?
diff --git a/app/views/shared/_sort_dropdown.html.haml b/app/views/shared/_sort_dropdown.html.haml
index ba14c8643cd993a7db64785f11da676ed225bbe7..af3d35de325d7465360f5764f600d5e2aa7b307c 100644
--- a/app/views/shared/_sort_dropdown.html.haml
+++ b/app/views/shared/_sort_dropdown.html.haml
@@ -1,5 +1,5 @@
.dropdown.inline.prepend-left-10
- %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
+ %button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
%span.light sort:
- if @sort.present?
= sort_options_hash[@sort]
diff --git a/features/steps/groups.rb b/features/steps/groups.rb
index dffa4d103e5b9a11bf3f990e105f561a55d68ff1..c3c34070e2e11c5d2fb7b1e9b7a1ae49d9e66443 100644
--- a/features/steps/groups.rb
+++ b/features/steps/groups.rb
@@ -29,7 +29,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
step 'I select user "Mary Jane" from list with role "Reporter"' do
user = User.find_by(name: "Mary Jane") || create(:user, name: "Mary Jane")
- click_link 'Add members'
+ click_button 'Add members'
within ".users-group-form" do
select2(user.id, from: "#user_ids", multiple: true)
select "Reporter", from: "access_level"