demarches-normaliennes/app/components/editable_champ/section_component/section_component.html.haml

20 lines
812 B
Text
Raw Normal View History

- if render_within_fieldset?
= tag.fieldset(class: "reset-#{tag_for_depth} fr-m-0 fr-p-0") do
= tag.legend do
= render EditableChamp::HeaderSectionComponent.new(champ: header_section)
- splitted_tail.each do |section, champ|
- if section.present?
= render section
- else
= fields_for champ.input_name, champ do |form|
= render EditableChamp::EditableChampComponent.new form: ,champ:
- else
- if header_section
%div{ class: "reset-#{tag_for_depth}" }= render EditableChamp::HeaderSectionComponent.new(champ: header_section)
- splitted_tail.each do |section, champ|
- if section.present?
= render section
- else
= fields_for champ.input_name, champ do |form|
= render EditableChamp::EditableChampComponent.new form: ,champ: