fix(Champs::Civilite): fix dsfr missing red feedback, add green feedback
This commit is contained in:
parent
9280ccc23d
commit
0519dece96
3 changed files with 18 additions and 13 deletions
|
@ -1,2 +1,5 @@
|
||||||
class EditableChamp::CiviliteComponent < EditableChamp::EditableChampBaseComponent
|
class EditableChamp::CiviliteComponent < EditableChamp::EditableChampBaseComponent
|
||||||
|
def dsfr_champ_container
|
||||||
|
:fieldset
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
%fieldset.fr-fieldset
|
|
||||||
%legend.fr-fieldset__legend--regular.fr-fieldset__legend
|
.fr-fieldset__element.fr-fieldset__element--inline
|
||||||
Sélectionnez une des valeurs
|
|
||||||
.fr-fieldset__element.fr-fieldset__element--inline
|
|
||||||
.fr-radio-group
|
.fr-radio-group
|
||||||
= @form.radio_button :value, Individual::GENDER_FEMALE, id: @champ.female_input_id
|
= @form.radio_button :value, Individual::GENDER_FEMALE, id: @champ.female_input_id
|
||||||
%label.fr-label{ for: @champ.female_input_id }
|
%label.fr-label{ for: @champ.female_input_id }
|
||||||
= Individual.human_attribute_name('gender.female')
|
= Individual.human_attribute_name('gender.female')
|
||||||
.fr-fieldset__element.fr-fieldset__element--inline
|
.fr-fieldset__element.fr-fieldset__element--inline
|
||||||
.fr-radio-group
|
.fr-radio-group
|
||||||
= @form.radio_button :value, Individual::GENDER_MALE, id: @champ.male_input_id
|
= @form.radio_button :value, Individual::GENDER_MALE, id: @champ.male_input_id
|
||||||
%label.fr-label{ for: @champ.male_input_id }
|
%label.fr-label{ for: @champ.male_input_id }
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
class Champs::CiviliteChamp < Champ
|
class Champs::CiviliteChamp < Champ
|
||||||
validates :value, inclusion: ["M.", "Mme"], allow_nil: true, allow_blank: false
|
validates :value, inclusion: ["M.", "Mme"], allow_nil: true, allow_blank: false
|
||||||
|
|
||||||
|
def legend_label?
|
||||||
|
true
|
||||||
|
end
|
||||||
|
|
||||||
def html_label?
|
def html_label?
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue