diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-07-05 11:45:58 +0100 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-07-05 19:20:52 +0100 |
commit | 197a5df42aa65821aaa8fa628244e27ee8e1b016 (patch) | |
tree | 12fb3601bfb5457cd0ac4e797541f061aadde056 /app/helpers | |
parent | 81dba76b9d7d120cd22e3619a4058bd4885be9bc (diff) | |
download | gitlab-ce-197a5df42aa65821aaa8fa628244e27ee8e1b016.tar.gz |
Allow admin to disable all restricted visibility levels32408-enable-disable-all-restricted-visibility-levels
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_settings_helper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb index ca326dd0627..f652f4901b7 100644 --- a/app/helpers/application_settings_helper.rb +++ b/app/helpers/application_settings_helper.rb @@ -34,17 +34,17 @@ module ApplicationSettingsHelper # Return a group of checkboxes that use Bootstrap's button plugin for a # toggle button effect. - def restricted_level_checkboxes(help_block_id) + def restricted_level_checkboxes(help_block_id, checkbox_name) Gitlab::VisibilityLevel.options.map do |name, level| checked = restricted_visibility_levels(true).include?(level) css_class = checked ? 'active' : '' - checkbox_name = "application_setting[restricted_visibility_levels][]" + tag_name = "application_setting_visibility_level_#{level}" - label_tag(name, class: css_class) do + label_tag(tag_name, class: css_class) do check_box_tag(checkbox_name, level, checked, autocomplete: 'off', 'aria-describedby' => help_block_id, - id: name) + visibility_level_icon(level) + name + id: tag_name) + visibility_level_icon(level) + name end end end |