demarches-normaliennes/app/components/editable_champ/cnaf_component/cnaf_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
558 B
Text

.cnaf-inputs
%div
= @form.label :numero_allocataire, t('.numero_allocataire_label')
%p.notice= t('.numero_allocataire_notice')
= @form.text_field :numero_allocataire,
required: @champ.required?,
aria: { describedby: @champ.describedby_id },
class: "width-33-desktop"
%div
= @form.label :code_postal, t('.code_postal_label')
%p.notice= t('.code_postal_notice')
= @form.text_field :code_postal,
required: @champ.required?,
aria: { describedby: @champ.describedby_id },
class: "width-33-desktop"