Skip to content
Snippets Groups Projects

BE: Allow customers to extend or reactivate their trial on gitlab.com [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Merged Qingyu Zhao requested to merge 290278-allow-extend-or-reactivate-trial-on-gitlab-com into master
All threads resolved!
4 files
+ 25
13
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -102,15 +102,20 @@ def import_sources_checkboxes(help_block_id, options = {})
@@ -102,15 +102,20 @@ def import_sources_checkboxes(help_block_id, options = {})
def oauth_providers_checkboxes
def oauth_providers_checkboxes
button_based_providers.map do |source|
button_based_providers.map do |source|
disabled = @application_setting.disabled_oauth_sign_in_sources.include?(source.to_s)
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)
name = Gitlab::Auth::OAuth::Provider.label_for(source)
checkbox_name = 'application_setting[enabled_oauth_sign_in_sources][]'
label_tag(checkbox_name, class: css_class.join(' ')) do
checkbox_id = "application_setting_enabled_oauth_sign_in_sources_#{name.parameterize(separator: '_')}"
check_box_tag(checkbox_name, source, !disabled,
autocomplete: 'off',
content_tag :div, class: 'form-check' do
id: name.tr(' ', '_')) + name
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
end
end
end
end
end
Loading