diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /app/views/shared/_visibility_radios.html.haml | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'app/views/shared/_visibility_radios.html.haml')
-rw-r--r-- | app/views/shared/_visibility_radios.html.haml | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/views/shared/_visibility_radios.html.haml b/app/views/shared/_visibility_radios.html.haml index 80532c9187b..90b12557bc8 100644 --- a/app/views/shared/_visibility_radios.html.haml +++ b/app/views/shared/_visibility_radios.html.haml @@ -1,8 +1,7 @@ -- Gitlab::VisibilityLevel.values.each do |level| - - disallowed = disallowed_visibility_level?(form_model, level) - - restricted = restricted_visibility_levels.include?(level) - - next if disallowed || restricted +- available_visibility_levels = available_visibility_levels(form_model) +- selected_level = snippets_selected_visibility_level(available_visibility_levels, selected_level) +- available_visibility_levels.each do |level| .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: "", qa_selector: "#{visibility_level_label(level).downcase}_radio" } = form.label "#{model_method}_#{level}", class: 'form-check-label' do |