Merge pull request #10312 from mfo/US/ensure-dsfr-style-on-some-champs
ETQ usager, je veux que tous les champs aient un style DSFR
This commit is contained in:
commit
d4e8227827
6 changed files with 19 additions and 4 deletions
|
@ -1,2 +1,5 @@
|
||||||
class EditableChamp::AddressComponent < EditableChamp::EditableChampBaseComponent
|
class EditableChamp::AddressComponent < EditableChamp::EditableChampBaseComponent
|
||||||
|
def dsfr_input_classname
|
||||||
|
'fr-select'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,4 +2,11 @@ class EditableChamp::AnnuaireEducationComponent < EditableChamp::ComboSearchComp
|
||||||
def dsfr_input_classname
|
def dsfr_input_classname
|
||||||
'fr-input'
|
'fr-input'
|
||||||
end
|
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
|
end
|
||||||
|
|
|
@ -3,7 +3,5 @@
|
||||||
= @form.hidden_field :value
|
= @form.hidden_field :value
|
||||||
= @form.hidden_field :external_id
|
= @form.hidden_field :external_id
|
||||||
= react_component("ComboAnnuaireEducationSearch",
|
= react_component("ComboAnnuaireEducationSearch",
|
||||||
required: @champ.required?,
|
**react_input_opts,
|
||||||
id: @champ.input_id,
|
|
||||||
describedby: @champ.describedby_id,
|
|
||||||
**react_combo_props)
|
**react_combo_props)
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
class EditableChamp::CommunesComponent < EditableChamp::EditableChampBaseComponent
|
class EditableChamp::CommunesComponent < EditableChamp::EditableChampBaseComponent
|
||||||
include ApplicationHelper
|
include ApplicationHelper
|
||||||
|
|
||||||
|
def dsfr_input_classname
|
||||||
|
'fr-select'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,2 +1,5 @@
|
||||||
class EditableChamp::RNFComponent < EditableChamp::EditableChampBaseComponent
|
class EditableChamp::RNFComponent < EditableChamp::EditableChampBaseComponent
|
||||||
|
def dsfr_input_classname
|
||||||
|
'fr-input'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
= @form.text_field :external_id, required: @champ.required?, class: "width-33-desktop fr-input small-margin", id: @champ.input_id
|
= @form.text_field :external_id, input_opts(id: @champ.input_id, required: @champ.required?, class: "width-33-desktop fr-input small-margin", aria: { describedby: @champ.describedby_id })
|
||||||
|
|
||||||
.rnf-info{ id: dom_id(@champ, :rnf_info) }
|
.rnf-info{ id: dom_id(@champ, :rnf_info) }
|
||||||
- if @champ.fetch_external_data_error?
|
- if @champ.fetch_external_data_error?
|
||||||
|
|
Loading…
Reference in a new issue