diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2016-11-19 14:44:06 +0000 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2016-11-21 23:11:14 +0000 |
commit | de21cfd1417e4e1f3d8076cd5e4bfc8a0f4b39ac (patch) | |
tree | 2486e4e1c202971920b075d1d41c03e0f87e52a1 /app | |
parent | 9aded5c8d43cf113b03e2d8fd04a32c4b24af24d (diff) | |
download | gitlab-ce-de21cfd1417e4e1f3d8076cd5e4bfc8a0f4b39ac.tar.gz |
Swapped buttons for checkboxes24161-non-intuitive-buttons-for-import-sources-in-administrator-settings-enable-disable
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_settings_helper.rb | 8 | ||||
-rw-r--r-- | app/views/admin/application_settings/_form.html.haml | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb index be5e0301a43..93c645d422c 100644 --- a/app/helpers/application_settings_helper.rb +++ b/app/helpers/application_settings_helper.rb @@ -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 diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml index a236335131a..de6b2272c43 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -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") |