blob: 68a4d0108726188b3031b80d7114d66dc9d7fc39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
- attribute = local_assigns.fetch(:attribute, nil)
- group = local_assigns.fetch(:group, nil)
- form = local_assigns.fetch(:form, nil)
- setting_locked = local_assigns.fetch(:setting_locked, false)
- help_text = local_assigns.fetch(:help_text, s_('CascadingSettings|Subgroups cannot change this setting.'))
- label = local_assigns.fetch(:label, s_('CascadingSettings|Enforce for all subgroups'))
- return unless attribute && group && form
- return if setting_locked
- lock_attribute = "lock_#{attribute}"
= form.gitlab_ui_checkbox_component lock_attribute,
label,
help_text: help_text,
checkbox_options: { checked: group.namespace_settings.public_send(lock_attribute), data: { testid: 'enforce-for-all-subgroups-checkbox' } }
|