gitlab-org--gitlab-foss/app/views/shared/_visibility_radios.html.haml
Donald Cook f219b74433 CE backport: Removed non-decimal event values
Snowplow only accepts decimals for value
This MR removes sending of value implicitly with the value attribute
2019-07-16 12:44:15 +00:00

19 lines
980 B
Text

- Gitlab::VisibilityLevel.values.each do |level|
- disallowed = disallowed_visibility_level?(form_model, level)
- restricted = restricted_visibility_levels.include?(level)
- next if disallowed || restricted
.form-check
= form.radio_button model_method, level, checked: (selected_level == level), class: 'form-check-input', data: { track_label: "blank_project", track_event: "activate_form_input", track_property: "#{model_method}_#{level}", track_value: "" }
= form.label "#{model_method}_#{level}", class: 'form-check-label' do
= visibility_level_icon(level)
.option-title
= visibility_level_label(level)
.option-description
= visibility_level_description(level, form_model)
.text-muted
- if all_visibility_levels_restricted?
= _('Visibility settings have been disabled by the administrator.')
- elsif multiple_visibility_levels_restricted?
= _('Other visibility settings have been disabled by the administrator.')