BigW Consortium Gitlab

Commit 10a7478e by Mike Greiling

fix disabled state style for visibility level options

parent 69f679ed
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
.radio { .radio {
margin-bottom: 10px; margin-bottom: 10px;
i { i.fa {
margin: 2px 0; margin: 2px 0;
font-size: 20px; font-size: 20px;
} }
...@@ -162,6 +162,12 @@ ...@@ -162,6 +162,12 @@
margin-left: 29px; margin-left: 29px;
color: $project-option-descr-color; color: $project-option-descr-color;
} }
&.disabled {
i.fa {
opacity: 0.5;
}
}
} }
} }
......
- Gitlab::VisibilityLevel.values.each do |level| - Gitlab::VisibilityLevel.values.each do |level|
- next if disallowed_visibility_level?(form_model, level) - disallowed = disallowed_visibility_level?(form_model, level)
.radio - restricted = restricted_visibility_levels.include?(level)
- restricted = restricted_visibility_levels.include?(level) - disabled = disallowed || restricted
.radio{ class: [('disabled' if disabled), ('restricted' if restricted)] }
= form.label "#{model_method}_#{level}" do = form.label "#{model_method}_#{level}" do
= form.radio_button model_method, level, checked: (selected_level == level), disabled: restricted = form.radio_button model_method, level, checked: (selected_level == level), disabled: disabled
= visibility_level_icon(level) = visibility_level_icon(level)
.option-title .option-title
= visibility_level_label(level) = visibility_level_label(level)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment