Merge pull request #10027 from mfo/US/input-state-valid-after-update

correctif(Champs::Civilite): ETQ usager, j'aimerais que le champs de type civilité ait le même style d'erreur que les autres
This commit is contained in:
Paul Chavard 2024-03-07 14:03:06 +00:00 committed by GitHub
commit 3b13595a41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 13 deletions

View file

@ -1,2 +1,5 @@
class EditableChamp::CiviliteComponent < EditableChamp::EditableChampBaseComponent
def dsfr_champ_container
:fieldset
end
end

View file

@ -1,13 +1,11 @@
%fieldset.fr-fieldset
%legend.fr-fieldset__legend--regular.fr-fieldset__legend
Sélectionnez une des valeurs
.fr-fieldset__element.fr-fieldset__element--inline
.fr-radio-group
= @form.radio_button :value, Individual::GENDER_FEMALE, id: @champ.female_input_id
%label.fr-label{ for: @champ.female_input_id }
= Individual.human_attribute_name('gender.female')
.fr-fieldset__element.fr-fieldset__element--inline
.fr-radio-group
= @form.radio_button :value, Individual::GENDER_MALE, id: @champ.male_input_id
%label.fr-label{ for: @champ.male_input_id }
= Individual.human_attribute_name('gender.male')
.fr-fieldset__element.fr-fieldset__element--inline
.fr-radio-group
= @form.radio_button :value, Individual::GENDER_FEMALE, id: @champ.female_input_id
%label.fr-label{ for: @champ.female_input_id }
= Individual.human_attribute_name('gender.female')
.fr-fieldset__element.fr-fieldset__element--inline
.fr-radio-group
= @form.radio_button :value, Individual::GENDER_MALE, id: @champ.male_input_id
%label.fr-label{ for: @champ.male_input_id }
= Individual.human_attribute_name('gender.male')

View file

@ -1,6 +1,10 @@
class Champs::CiviliteChamp < Champ
validates :value, inclusion: ["M.", "Mme"], allow_nil: true, allow_blank: false
def legend_label?
true
end
def html_label?
false
end