Commit f3da5cad authored by Robert Speicher's avatar Robert Speicher

Merge branch...

Merge branch '29126-enabled-oauth-sign-in-sources-has-confusing-ui-for-disabling-enabling-omniauth-providers' into 'master'

Fix styling of "Enabled OAuth sign-in sources" checkboxes

See merge request gitlab-org/gitlab!56254
parents d071b6ae 396ef600
......@@ -102,15 +102,20 @@ module ApplicationSettingsHelper
def oauth_providers_checkboxes
button_based_providers.map do |source|
disabled = @application_setting.disabled_oauth_sign_in_sources.include?(source.to_s)
css_class = ['btn']
css_class << 'active' unless disabled
checkbox_name = 'application_setting[enabled_oauth_sign_in_sources][]'
name = Gitlab::Auth::OAuth::Provider.label_for(source)
checkbox_name = 'application_setting[enabled_oauth_sign_in_sources][]'
checkbox_id = "application_setting_enabled_oauth_sign_in_sources_#{name.parameterize(separator: '_')}"
label_tag(checkbox_name, class: css_class.join(' ')) do
check_box_tag(checkbox_name, source, !disabled,
content_tag :div, class: 'form-check' do
check_box_tag(
checkbox_name,
source,
!disabled,
autocomplete: 'off',
id: name.tr(' ', '_')) + name
id: checkbox_id,
class: 'form-check-input'
) +
label_tag(checkbox_id, name, class: 'form-check-label')
end
end
end
......
......@@ -20,10 +20,9 @@
or LDAP password
must be used to authenticate.
- if omniauth_enabled? && button_based_providers.any?
.form-group
= f.label :enabled_oauth_sign_in_sources, 'Enabled OAuth sign-in sources', class: 'label-bold'
%fieldset.form-group
%legend.gl-font-base.gl-mb-3.gl-border-none.gl-font-weight-bold= _('Enabled OAuth sign-in sources')
= hidden_field_tag 'application_setting[enabled_oauth_sign_in_sources][]'
.btn-group{ data: { toggle: 'buttons' } }
- oauth_providers_checkboxes.each do |source|
= source
.form-group
......
---
title: Fix styling of "Enabled OAuth sign-in sources" checkboxes
merge_request: 56254
author:
type: fixed
......@@ -11521,6 +11521,9 @@ msgstr ""
msgid "Enabled Git access protocols"
msgstr ""
msgid "Enabled OAuth sign-in sources"
msgstr ""
msgid "Enabled sources for code import during project creation. OmniAuth must be configured for GitHub"
msgstr ""
......
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