Commit 600959bb authored by Alfredo Sumaran's avatar Alfredo Sumaran

Fix conflicts

parent 4e2ea9ed
......@@ -16,7 +16,6 @@
$dropdown.glDropdown({
selectable: true,
<<<<<<< HEAD
filterable: true,
filterRemote: true,
data: this.getData.bind(this),
......@@ -35,16 +34,6 @@
setActiveIds() {
// Needed for pre select options
this.activeIds = self.getActiveIds();
=======
inputId: $dropdown.data('input-id'),
fieldName: $dropdown.data('field-name'),
toggleLabel(item, el) {
if (el.is('.is-active')) {
return item.text;
} else {
return 'Select';
}
>>>>>>> b2bf01f4c271be66e93ed6f4b48a1da4d50e558d
},
clicked(item, $el, e) {
e.preventDefault();
......
......@@ -48,11 +48,7 @@
const $allowedToMergeInputs = this.$wrap.find('input[name^="protected_branch[merge_access_levels_attributes]"]');
const $allowedToPushInputs = this.$wrap.find('input[name^="protected_branch[push_access_levels_attributes]"]');
<<<<<<< HEAD
this.$form.find('input[type="submit"]').attr('disabled', !($branchInput.val() && $allowedToMergeInputs.length && $allowedToPushInputs.length));
=======
this.$form.find('input[type="submit"]').attr('disabled', !($branchInput.val() && $allowedToMergeInput.length && $allowedToPushInput.length));
>>>>>>> b2bf01f4c271be66e93ed6f4b48a1da4d50e558d
}
}
......
......@@ -77,7 +77,6 @@
onDropdownHide() {
if (!this.hasChanges) return;
<<<<<<< HEAD
this.hasChanges = true;
this.updatePermissions();
......@@ -91,12 +90,6 @@
}
return $.ajax({
=======
// Do not update if one dropdown has not selected any option
if (!($allowedToMergeInput.length && $allowedToPushInput.length)) return;
$.ajax({
>>>>>>> b2bf01f4c271be66e93ed6f4b48a1da4d50e558d
type: 'POST',
url: this.$wrap.data('url'),
dataType: 'json',
......
......@@ -24,30 +24,18 @@
.col-md-10
.merge_access_levels-container
= dropdown_tag('Select',
<<<<<<< HEAD
options: { toggle_class: 'js-allowed-to-merge js-multiselect wide',
dropdown_class: 'dropdown-menu-user dropdown-menu-selectable', filter: true,
data: { input_id: 'merge_access_levels_attributes', default_label: 'Select' } })
=======
options: { toggle_class: 'js-allowed-to-merge wide',
dropdown_class: 'dropdown-menu-selectable',
data: { field_name: 'protected_branch[merge_access_levels_attributes][0][access_level]', input_id: 'merge_access_levels_attributes' }})
>>>>>>> b2bf01f4c271be66e93ed6f4b48a1da4d50e558d
.form-group
%label.col-md-2.text-right{ for: 'push_access_levels_attributes' }
Allowed to push:
.col-md-10
.push_access_levels-container
= dropdown_tag('Select',
<<<<<<< HEAD
options: { toggle_class: 'js-allowed-to-push js-multiselect wide',
dropdown_class: 'dropdown-menu-user dropdown-menu-selectable', filter: true,
data: { input_id: 'push_access_levels_attributes', default_label: 'Select' } })
=======
options: { toggle_class: 'js-allowed-to-push wide',
dropdown_class: 'dropdown-menu-selectable',
data: { field_name: 'protected_branch[push_access_levels_attributes][0][access_level]', input_id: 'push_access_levels_attributes' }})
>>>>>>> b2bf01f4c271be66e93ed6f4b48a1da4d50e558d
.panel-footer
= f.submit 'Protect', class: 'btn-create btn', disabled: true
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