Commit 2783e689 authored by Jacques Erasmus's avatar Jacques Erasmus

Merge branch '336691-Migrate-group-2FA-checkboxes-to-gitlab_ui_checkbox_component' into 'master'

Migrate group 2FA checkboxes to gitlab_ui_checkbox_component

See merge request gitlab-org/gitlab!66699
parents b84c7bd6 077aa0bf
...@@ -7,17 +7,15 @@ ...@@ -7,17 +7,15 @@
%p= s_('Check the %{docs_link_start}documentation%{docs_link_end}.').html_safe % { docs_link_start: docs_link_start, docs_link_end: '</a>'.html_safe } %p= s_('Check the %{docs_link_start}documentation%{docs_link_end}.').html_safe % { docs_link_start: docs_link_start, docs_link_end: '</a>'.html_safe }
.form-group .form-group
.gl-form-checkbox.custom-control.custom-checkbox = f.gitlab_ui_checkbox_component :require_two_factor_authentication,
= f.check_box :require_two_factor_authentication, class: 'custom-control-input', data: { qa_selector: 'require_2fa_checkbox' } _('Require all users in this group to setup two-factor authentication'),
= f.label :require_two_factor_authentication, class: 'custom-control-label' do checkbox_options: { data: { qa_selector: 'require_2fa_checkbox' } }
= _('Require all users in this group to setup two-factor authentication')
.form-group .form-group
= f.label :two_factor_grace_period, _('Time before enforced'), class: 'label-bold' = f.label :two_factor_grace_period, _('Time before enforced'), class: 'label-bold'
= f.text_field :two_factor_grace_period, class: 'form-control form-control-sm w-auto' = f.text_field :two_factor_grace_period, class: 'form-control form-control-sm w-auto'
.form-text.text-muted= _('Amount of time (in hours) that users are allowed to skip forced configuration of two-factor authentication') .form-text.text-muted= _('Amount of time (in hours) that users are allowed to skip forced configuration of two-factor authentication')
- unless group.has_parent? - unless group.has_parent?
.form-group .form-group
.gl-form-checkbox.custom-control.custom-checkbox = f.gitlab_ui_checkbox_component :allow_mfa_for_subgroups,
= f.check_box :allow_mfa_for_subgroups, class: 'custom-control-input', checked: group.namespace_settings&.allow_mfa_for_subgroups _('Allow subgroups to set up their own two-factor authentication rules'),
= f.label :allow_mfa_for_subgroups, class: 'custom-control-label' do checkbox_options: { checked: group.namespace_settings&.allow_mfa_for_subgroups }
= _('Allow subgroups to set up their own two-factor authentication rules')
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