diff --git a/app/components/editable_champ/annuaire_education_component.rb b/app/components/editable_champ/annuaire_education_component.rb index 0cb736e9c..847b6cc21 100644 --- a/app/components/editable_champ/annuaire_education_component.rb +++ b/app/components/editable_champ/annuaire_education_component.rb @@ -2,4 +2,11 @@ class EditableChamp::AnnuaireEducationComponent < EditableChamp::ComboSearchComp def dsfr_input_classname 'fr-input' end + + def react_input_opts + opts = input_opts(id: @champ.input_id, required: @champ.required?, aria: { describedby: @champ.describedby_id }) + opts[:className] = "#{opts.delete(:class)} fr-mt-1w" + + opts + end end diff --git a/app/components/editable_champ/annuaire_education_component/annuaire_education_component.html.haml b/app/components/editable_champ/annuaire_education_component/annuaire_education_component.html.haml index 0dcfe97d0..00ce7bbba 100644 --- a/app/components/editable_champ/annuaire_education_component/annuaire_education_component.html.haml +++ b/app/components/editable_champ/annuaire_education_component/annuaire_education_component.html.haml @@ -3,7 +3,5 @@ = @form.hidden_field :value = @form.hidden_field :external_id = react_component("ComboAnnuaireEducationSearch", - required: @champ.required?, - id: @champ.input_id, - describedby: @champ.describedby_id, + **react_input_opts, **react_combo_props)