Commit e754b554 authored by Simon Knox's avatar Simon Knox Committed by Jose Ivan Vargas

convert delete buttons to button elements

parent b433d1ab
...@@ -35,12 +35,11 @@ ...@@ -35,12 +35,11 @@
multiple: true, multiple: true,
minimumInputLength: 0, minimumInputLength: 0,
query(query) { query(query) {
var options = { }; const groupsApi = Api.groups(query.term, {}, function(groups) {
const groupsApi = Api.groups(query.term, options, function(groups) {
return groups; return groups;
}); });
const usersApi = Api.users(query.term, options, function(groups) { const usersApi = Api.users(query.term, {}, function(groups) {
return groups; return groups;
}); });
...@@ -143,7 +142,7 @@ ...@@ -143,7 +142,7 @@
const target = evt.currentTarget; const target = evt.currentTarget;
$('.load-wrapper').removeClass('hidden'); $('.load-wrapper').removeClass('hidden');
$.ajax({ $.ajax({
url: target.href, url: target.getAttribute('href'),
type: 'POST', type: 'POST',
data: { data: {
_method: 'DELETE', _method: 'DELETE',
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
%li.approver.settings-flex-row %li.approver.settings-flex-row
= link_to approver.user.name, approver.user = link_to approver.user.name, approver.user
.pull-right .pull-right
= link_to namespace_project_approver_path(project.namespace, project, approver), data: { confirm: "Are you sure you want to remove approver #{approver.user.name}"}, class: "btn btn-remove js-approver-remove", title: 'Remove approver' do %button{ href: namespace_project_approver_path(project.namespace, project, approver), data: { confirm: "Are you sure you want to remove approver #{approver.user.name}"}, class: "btn btn-remove js-approver-remove", title: 'Remove approver' }
= icon("trash") = icon("trash")
- project.approver_groups.each do |approver_group| - project.approver_groups.each do |approver_group|
%li.approver-group.settings-flex-row %li.approver-group.settings-flex-row
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
%span.badge %span.badge
= approver_group.group.members.count = approver_group.group.members.count
.pull-right .pull-right
= link_to namespace_project_approver_group_path(project.namespace, project, approver_group), data: { confirm: "Are you sure you want to remove group #{approver_group.group.name}" }, class: "btn btn-remove js-approver-remove", title: 'Remove group' do %button{ href: namespace_project_approver_group_path(project.namespace, project, approver_group), data: { confirm: "Are you sure you want to remove group #{approver_group.group.name}" }, class: "btn btn-remove js-approver-remove", title: 'Remove group' }
= icon("trash") = icon("trash")
- if project.approvers.empty? && project.approver_groups.empty? - if project.approvers.empty? && project.approver_groups.empty?
%li There are no approvers %li There are no approvers
......
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