fix(champ): use champ.mandatory?

This commit is contained in:
Paul Chavard 2023-03-21 11:23:33 +01:00
parent 22d0ad64db
commit 4dc95417c5
2 changed files with 2 additions and 2 deletions

View file

@ -1,5 +1,5 @@
#{@champ.libelle}
- if @champ.type_de_champ.mandatory?
- if @champ.mandatory?
%span.mandatory *
- if @champ.updated_at.present? && @seen_at.present?

View file

@ -6,7 +6,7 @@
.secondary{ class: @champ.has_secondary_options_for_primary? ? '' : 'hidden' }
= @form.label :secondary_value, for: "#{@champ.input_id}-secondary" do
- sanitize((@champ.drop_down_secondary_libelle.presence || "Valeur secondaire dépendant de la première") + (@champ.type_de_champ.mandatory? ? tag.span(' *', class: 'mandatory') : ''))
- sanitize((@champ.drop_down_secondary_libelle.presence || "Valeur secondaire dépendant de la première") + (@champ.mandatory? ? tag.span(' *', class: 'mandatory') : ''))
- if @champ.drop_down_secondary_description.present?
.notice{ id: "#{@champ.describedby_id}-secondary" }= render SimpleFormatComponent.new(@champ.drop_down_secondary_description, allow_a: true)
= @form.select :secondary_value,