diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-04 09:09:02 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-04 09:09:02 +0000 |
commit | 48640cf76a1ee0cd515e259d8f3eb2de25ba01c3 (patch) | |
tree | 84719b9b1f23a396298b0774ed8920cb401426d6 /app/helpers | |
parent | 7d4987ae65374a40ab540ad825da3c33d8bab6df (diff) | |
download | gitlab-ce-48640cf76a1ee0cd515e259d8f3eb2de25ba01c3.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_settings_helper.rb | 26 | ||||
-rw-r--r-- | app/helpers/boards_helper.rb | 1 |
2 files changed, 10 insertions, 17 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb index 456a678ce77..dbdfa0c1eab 100644 --- a/app/helpers/application_settings_helper.rb +++ b/app/helpers/application_settings_helper.rb @@ -97,24 +97,18 @@ module ApplicationSettingsHelper end end - def oauth_providers_checkboxes + def oauth_providers_checkboxes(form) button_based_providers.map do |source| - disabled = @application_setting.disabled_oauth_sign_in_sources.include?(source.to_s) + checked = !@application_setting.disabled_oauth_sign_in_sources.include?(source.to_s) 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: '_')}" - - content_tag :div, class: 'form-check' do - check_box_tag( - checkbox_name, - source, - !disabled, - autocomplete: 'off', - id: checkbox_id, - class: 'form-check-input' - ) + - label_tag(checkbox_id, name, class: 'form-check-label') - end + + form.gitlab_ui_checkbox_component( + :enabled_oauth_sign_in_sources, + name, + checkbox_options: { checked: checked, multiple: true, autocomplete: 'off' }, + checked_value: source, + unchecked_value: nil + ) end end diff --git a/app/helpers/boards_helper.rb b/app/helpers/boards_helper.rb index f849f36bf84..f98e70e41d8 100644 --- a/app/helpers/boards_helper.rb +++ b/app/helpers/boards_helper.rb @@ -25,7 +25,6 @@ module BoardsHelper labels_manage_path: labels_manage_path, releases_fetch_path: releases_fetch_path, board_type: board.to_type, - has_scope: board.scoped?.to_s, has_missing_boards: has_missing_boards?.to_s, multiple_boards_available: multiple_boards_available?.to_s, board_base_url: board_base_url |