Commit f096cc04 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Set for for labels and ID for dropdowns on create form

parent fe8ff714
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
$dropdown.glDropdown({ $dropdown.glDropdown({
data: data, data: data,
selectable: true, selectable: true,
inputId: $dropdown.data('input-id'),
fieldName: $dropdown.data('field-name'), fieldName: $dropdown.data('field-name'),
toggleLabel(item) { toggleLabel(item) {
return item.text; return item.text;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
.panel-body .panel-body
.form-horizontal .form-horizontal
.form-group .form-group
%label.col-md-2.text-right = f.label :name, class: 'col-md-2 text-right' do
Branch: Branch:
.col-md-10 .col-md-10
= render partial: "dropdown", locals: { f: f } = render partial: "dropdown", locals: { f: f }
...@@ -18,19 +18,19 @@ ...@@ -18,19 +18,19 @@
%code production/* %code production/*
are supported are supported
.form-group .form-group
%label.col-md-2.text-right %label.col-md-2.text-right{ for: 'merge_access_level_attributes' }
Allowed to merge: Allowed to merge:
.col-md-10 .col-md-10
= dropdown_tag('Select', = dropdown_tag('Select',
options: { toggle_class: 'js-allowed-to-merge wide', options: { toggle_class: 'js-allowed-to-merge wide',
data: { field_name: 'protected_branch[merge_access_level_attributes][access_level]' }}) data: { field_name: 'protected_branch[merge_access_level_attributes][access_level]', input_id: 'merge_access_level_attributes' }})
.form-group .form-group
%label.col-md-2.text-right %label.col-md-2.text-right{ for: 'push_access_level_attributes' }
Allowed to push: Allowed to push:
.col-md-10 .col-md-10
= dropdown_tag('Select', = dropdown_tag('Select',
options: { toggle_class: 'js-allowed-to-push wide', options: { toggle_class: 'js-allowed-to-push wide',
data: { field_name: 'protected_branch[push_access_level_attributes][access_level]' }}) data: { field_name: 'protected_branch[push_access_level_attributes][access_level]', input_id: 'push_access_level_attributes' }})
.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