summaryrefslogtreecommitdiff
path: root/app/views/shared/namespaces/cascading_settings/_setting_label_checkbox.html.haml
blob: d27b364163782631347346808e7e081390d81bf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- attribute = local_assigns.fetch(:attribute, nil)
- settings_path_helper = local_assigns.fetch(:settings_path_helper, nil)
- form = local_assigns.fetch(:form, nil)
- setting_locked = local_assigns.fetch(:setting_locked, false)
- help_text = local_assigns.fetch(:help_text, nil)

- return unless attribute && form && settings_path_helper

= form.label attribute, class: 'custom-control-label', aria: { disabled: setting_locked } do
  = render 'shared/namespaces/cascading_settings/setting_label_container' do
    = yield
    - if setting_locked
      = render 'shared/namespaces/cascading_settings/lock_icon', local_assigns
  - if help_text
    %p.help-text
      = help_text