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

Fix conflicts

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