Champ Repetition has no label, thus it's displayed as a section

This commit is contained in:
simon lehericey 2019-11-21 11:51:34 +01:00
parent 2162522814
commit 054181a16f
2 changed files with 4 additions and 2 deletions

View file

@ -1,4 +1,4 @@
= form.label champ.main_value_name, { class: champ.repetition? ? 'header-section' : '' } do
= form.label champ.main_value_name do
#{champ.libelle}
- if champ.mandatory?
%span.mandatory *

View file

@ -1,5 +1,7 @@
.editable-champ{ class: "editable-champ-#{champ.type_champ}" }
- if has_label?(champ)
- if champ.repetition?
= render partial: 'shared/dossiers/editable_champs/header_section', locals: { champ: champ }
- elsif has_label?(champ)
= render partial: 'shared/dossiers/editable_champs/champ_label', locals: { form: form, champ: champ, seen_at: defined?(seen_at) ? seen_at : nil }
= render partial: "shared/dossiers/editable_champs/#{champ.type_champ}",