Swapped buttons for checkboxes
This commit is contained in:
parent
9aded5c8d4
commit
de21cfd141
3 changed files with 10 additions and 8 deletions
|
@ -67,14 +67,14 @@ module ApplicationSettingsHelper
|
|||
def import_sources_checkboxes(help_block_id)
|
||||
Gitlab::ImportSources.options.map do |name, source|
|
||||
checked = current_application_settings.import_sources.include?(source)
|
||||
css_class = 'btn'
|
||||
css_class += ' active' if checked
|
||||
css_class = checked ? 'active' : ''
|
||||
checkbox_name = 'application_setting[import_sources][]'
|
||||
|
||||
label_tag(checkbox_name, class: css_class) do
|
||||
label_tag(name, class: css_class) do
|
||||
check_box_tag(checkbox_name, source, checked,
|
||||
autocomplete: 'off',
|
||||
'aria-describedby' => help_block_id) + name
|
||||
'aria-describedby' => help_block_id,
|
||||
id: name.tr(' ', '_')) + name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -32,10 +32,8 @@
|
|||
.form-group
|
||||
= f.label :import_sources, class: 'control-label col-sm-2'
|
||||
.col-sm-10
|
||||
- data_attrs = { toggle: 'buttons' }
|
||||
.btn-group{ data: data_attrs }
|
||||
- import_sources_checkboxes('import-sources-help').each do |source|
|
||||
= source
|
||||
- import_sources_checkboxes('import-sources-help').each do |source|
|
||||
.checkbox= source
|
||||
%span.help-block#import-sources-help
|
||||
Enabled sources for code import during project creation. OmniAuth must be configured for GitHub
|
||||
= link_to "(?)", help_page_path("integration/github")
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Changed import sources buttons to checkboxes
|
||||
merge_request: 7598
|
||||
author: Luke "Jared" Bennett
|
Loading…
Reference in a new issue