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

_enforcement_checkbox.html.haml « cascading_settings « namespaces « shared « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d167ffb55823b7f64b6f641240d4fde493ce28d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
- 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.'))

- return unless attribute && group && form
- return if setting_locked

- lock_attribute = "lock_#{attribute}"

= form.gitlab_ui_checkbox_component lock_attribute,
  s_('CascadingSettings|Enforce for all subgroups'),
  help_text: help_text,
  checkbox_options: { checked: group.namespace_settings.public_send(lock_attribute), data: { testid: 'enforce-for-all-subgroups-checkbox' } }