Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Gliga <otzy_007@yahoo.com>2016-05-10 11:29:19 +0300
committerAndrei Gliga <otzy_007@yahoo.com>2016-05-12 13:44:46 +0300
commit7818f7329a436d86b30dff003b60ab8a15a4f0db (patch)
tree3da4f3166c2fd2eeff9279938bbef53496a85c45 /app/helpers/application_settings_helper.rb
parent96122034cfc2eb7039ae75b20b729f35e9aa832e (diff)
On Application Settings Page let the user select the enabled OAuth Sign in sources instead of the disabled ones
Diffstat (limited to 'app/helpers/application_settings_helper.rb')
-rw-r--r--app/helpers/application_settings_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb
index 17d73899878..ced8e16de74 100644
--- a/app/helpers/application_settings_helper.rb
+++ b/app/helpers/application_settings_helper.rb
@@ -63,13 +63,13 @@ module ApplicationSettingsHelper
def oauth_providers_checkboxes(help_block_id)
button_based_providers.map do |source|
- checked = current_application_settings.disabled_oauth_sign_in_sources.include?(source.to_s)
+ disabled = current_application_settings.disabled_oauth_sign_in_sources.include?(source.to_s)
css_class = 'btn'
- css_class += ' active' if checked
- checkbox_name = 'application_setting[disabled_oauth_sign_in_sources][]'
+ css_class += ' active' unless disabled
+ checkbox_name = 'application_setting[enabled_oauth_sign_in_sources][]'
label_tag(checkbox_name, class: css_class) do
- check_box_tag(checkbox_name, source, checked,
+ check_box_tag(checkbox_name, source, !disabled,
autocomplete: 'off',
'aria-describedby' => help_block_id) + Gitlab::OAuth::Provider.label_for(source)
end