diff options
Diffstat (limited to 'app/views/shared/namespaces/cascading_settings')
-rw-r--r-- | app/views/shared/namespaces/cascading_settings/_enforcement_checkbox.html.haml | 3 | ||||
-rw-r--r-- | app/views/shared/namespaces/cascading_settings/_lock_icon.html.haml | 7 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/views/shared/namespaces/cascading_settings/_enforcement_checkbox.html.haml b/app/views/shared/namespaces/cascading_settings/_enforcement_checkbox.html.haml index d167ffb5582..68a4d010872 100644 --- a/app/views/shared/namespaces/cascading_settings/_enforcement_checkbox.html.haml +++ b/app/views/shared/namespaces/cascading_settings/_enforcement_checkbox.html.haml @@ -3,6 +3,7 @@ - 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 @@ -10,6 +11,6 @@ - lock_attribute = "lock_#{attribute}" = form.gitlab_ui_checkbox_component lock_attribute, - s_('CascadingSettings|Enforce for all subgroups'), + label, help_text: help_text, checkbox_options: { checked: group.namespace_settings.public_send(lock_attribute), data: { testid: 'enforce-for-all-subgroups-checkbox' } } diff --git a/app/views/shared/namespaces/cascading_settings/_lock_icon.html.haml b/app/views/shared/namespaces/cascading_settings/_lock_icon.html.haml index 4e3b6b2afc4..ed835af6524 100644 --- a/app/views/shared/namespaces/cascading_settings/_lock_icon.html.haml +++ b/app/views/shared/namespaces/cascading_settings/_lock_icon.html.haml @@ -1,4 +1,3 @@ -%button.position-absolute.gl-top-3.gl-right-0.gl-translate-y-n50.gl-cursor-default.btn.btn-default.btn-sm.gl-button.btn-default-tertiary.js-cascading-settings-lock-popover-target{ class: 'gl-p-1! gl-text-gray-600! gl-bg-transparent!', - type: 'button', - data: cascading_namespace_settings_popover_data(attribute, group, settings_path_helper) } - = sprite_icon('lock', size: 16) +- class_list = local_assigns.fetch(:class_list, '') + += render Pajamas::ButtonComponent.new(category: 'tertiary', icon: 'lock', button_options: { class: "gl-absolute gl-top-3 gl-right-0 gl-translate-y-n50 gl-p-1! gl-bg-transparent! gl-cursor-default! js-cascading-settings-lock-popover-target #{class_list}", data: cascading_namespace_settings_popover_data(attribute, group, settings_path_helper) }) |