diff options
author | Robert Speicher <robert@gitlab.com> | 2017-07-13 07:43:00 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-07-13 07:43:00 +0300 |
commit | 3c197e74827b99a524a70f05fb4e955a036172b5 (patch) | |
tree | a105532f165f1451c3b84c30862b1e00c637f2e4 /app | |
parent | a2961a1cf9622ac41952ec95b920c4d3d421c3df (diff) | |
parent | a90ca93c1f3c88d8c6339dddb2e6c35296382e9f (diff) |
Merge branch '34780-restricted-visibility-levels-in-admin-application-settings-looks-off' into 'master'
Fix wrong helper used for adding context for translations.
Closes #34780
See merge request !12731
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_settings_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb index f652f4901b7..45b10f61f33 100644 --- a/app/helpers/application_settings_helper.rb +++ b/app/helpers/application_settings_helper.rb @@ -35,7 +35,7 @@ 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, checkbox_name) - Gitlab::VisibilityLevel.options.map do |name, level| + Gitlab::VisibilityLevel.values.map do |level| checked = restricted_visibility_levels(true).include?(level) css_class = checked ? 'active' : '' tag_name = "application_setting_visibility_level_#{level}" @@ -44,7 +44,7 @@ module ApplicationSettingsHelper check_box_tag(checkbox_name, level, checked, autocomplete: 'off', 'aria-describedby' => help_block_id, - id: tag_name) + visibility_level_icon(level) + name + id: tag_name) + visibility_level_icon(level) + visibility_level_label(level) end end end |