summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRuben Davila <rdavila84@gmail.com>2017-07-12 12:38:02 -0500
committerRuben Davila <rdavila84@gmail.com>2017-07-12 12:38:02 -0500
commita90ca93c1f3c88d8c6339dddb2e6c35296382e9f (patch)
treecfb3e2eaa240888f62049f2d344fc613a9501734 /app
parent42481d1b437f9502dc776b1ba7cb1276d5e4e984 (diff)
downloadgitlab-ce-a90ca93c1f3c88d8c6339dddb2e6c35296382e9f.tar.gz
Fix wrong helper used for adding context for translations.34780-restricted-visibility-levels-in-admin-application-settings-looks-off
Additionally some missing translations were added
Diffstat (limited to 'app')
-rw-r--r--app/helpers/application_settings_helper.rb4
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