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 @@
multiple: true,
minimumInputLength: 0,
query(query) {
var options = { };
const groupsApi = Api.groups(query.term, options, function(groups) {
const groupsApi = Api.groups(query.term, {}, function(groups) {
return groups;
});
const usersApi = Api.users(query.term, options, function(groups) {
const usersApi = Api.users(query.term, {}, function(groups) {
return groups;
});
......@@ -143,7 +142,7 @@
const target = evt.currentTarget;
$('.load-wrapper').removeClass('hidden');
$.ajax({
url: target.href,
url: target.getAttribute('href'),
type: 'POST',
data: {
_method: 'DELETE',
......
......@@ -75,7 +75,7 @@
%li.approver.settings-flex-row
= link_to approver.user.name, approver.user
.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")
- project.approver_groups.each do |approver_group|
%li.approver-group.settings-flex-row
......@@ -86,7 +86,7 @@
%span.badge
= approver_group.group.members.count
.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")
- if project.approvers.empty? && project.approver_groups.empty?
%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