homogenize render? if not options
This commit is contained in:
parent
f1a606da6d
commit
85684e3bea
4 changed files with 35 additions and 29 deletions
|
@ -5,6 +5,10 @@ class EditableChamp::LinkedDropDownListComponent < EditableChamp::EditableChampB
|
|||
:fieldset
|
||||
end
|
||||
|
||||
def render?
|
||||
@champ.drop_down_options.any?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def secondary_label
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
- if @champ.drop_down_options.any?
|
||||
.fr-fieldset__element.fr-mb-0
|
||||
.fr-select-group
|
||||
= render EditableChamp::ChampLabelComponent.new form: @form, champ: @champ, seen_at: @seen_at
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
- if @champ.drop_down_options.any?
|
||||
- if @champ.render_as_checkboxes?
|
||||
= @form.collection_check_boxes :value, @champ.enabled_non_empty_options, :to_s, :to_s do |b|
|
||||
- capture do
|
||||
|
|
|
@ -88,6 +88,10 @@ class Champs::MultipleDropDownListChamp < Champ
|
|||
end
|
||||
end
|
||||
|
||||
def render?
|
||||
@champ.drop_down_options.any?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def values_are_in_options
|
||||
|
|
Loading…
Add table
Reference in a new issue