demarches-normaliennes/app/components/editable_champ/dgfip_component/dgfip_component.html.haml
simon lehericey 528b7ec3f8 refactor(champ): add required?
used for the `required` html attribute. It check visibility to avoid hidden required input which prevent the form from being sent.
2022-10-18 11:13:41 +02:00

16 lines
551 B
Text

.dgfip-inputs
%div
= @form.label :numero_fiscal, t('.numero_fiscal_label')
%p.notice= t('.numero_fiscal_notice')
= @form.text_field :numero_fiscal,
required: @champ.required?,
aria: { describedby: @champ.describedby_id },
class: "width-33-desktop"
%div
= @form.label :reference_avis, t('.reference_avis_label')
%p.notice= t('.reference_avis_notice')
= @form.text_field :reference_avis,
required: @champ.required?,
aria: { describedby: @champ.describedby_id },
class: "width-33-desktop"