Merge pull request #5779 from betagouv/update-civilite
presente la civilité par ordre alphabétique
This commit is contained in:
commit
5abb07420b
10 changed files with 18 additions and 15 deletions
|
@ -19,7 +19,7 @@ class Individual < ApplicationRecord
|
|||
validates :nom, presence: true, allow_blank: false, allow_nil: false, on: :update
|
||||
validates :prenom, presence: true, allow_blank: false, allow_nil: false, on: :update
|
||||
|
||||
GENDER_MALE = 'M.'
|
||||
GENDER_MALE = "M."
|
||||
GENDER_FEMALE = 'Mme'
|
||||
|
||||
def self.from_france_connect(fc_information)
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
%legend.mandatory-explanation
|
||||
Sélectionnez une des valeurs
|
||||
%label
|
||||
= form.radio_button :value, Individual::GENDER_MALE
|
||||
Monsieur
|
||||
= form.radio_button :value, Individual::GENDER_FEMALE
|
||||
= t(Individual::GENDER_FEMALE, scope: 'activerecord.attributes.individual.gender_options')
|
||||
|
||||
%label
|
||||
= form.radio_button :value, Individual::GENDER_FEMALE
|
||||
Madame
|
||||
= form.radio_button :value, Individual::GENDER_MALE
|
||||
= t('activerecord.attributes.individual.gender_options')[Individual::GENDER_MALE.to_sym] # GENDER_MALE contains a point letter
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
%legend
|
||||
= f.label :gender
|
||||
.radios
|
||||
%label
|
||||
= f.radio_button :gender, Individual::GENDER_MALE, required: true
|
||||
= Individual::GENDER_MALE
|
||||
%label
|
||||
= f.radio_button :gender, Individual::GENDER_FEMALE, required: true
|
||||
= Individual::GENDER_FEMALE
|
||||
= t(Individual::GENDER_FEMALE, scope: 'activerecord.attributes.individual.gender_options')
|
||||
%label
|
||||
= f.radio_button :gender, Individual::GENDER_MALE, required: true
|
||||
= t('activerecord.attributes.individual.gender_options')[Individual::GENDER_MALE.to_sym] # GENDER_MALE contains a point letter
|
||||
|
||||
.flex
|
||||
.inline-champ
|
||||
|
|
|
@ -6,3 +6,6 @@ fr:
|
|||
nom: Nom
|
||||
prenom: Prénom
|
||||
birthdate: Date de naissance
|
||||
gender_options:
|
||||
"Mme": "Madame"
|
||||
"M." : "Monsieur"
|
||||
|
|
|
@ -57,7 +57,7 @@ FactoryBot.define do
|
|||
|
||||
factory :champ_civilite, class: 'Champs::CiviliteChamp' do
|
||||
type_de_champ { association :type_de_champ_civilite, procedure: dossier.procedure }
|
||||
value { 'M.' }
|
||||
value { 'Monsieur' }
|
||||
end
|
||||
|
||||
factory :champ_email, class: 'Champs::EmailChamp' do
|
||||
|
|
|
@ -57,7 +57,7 @@ feature 'wcag rules for usager', js: true do
|
|||
scenario "dépot d'un dossier" do
|
||||
click_on 'Commencer la démarche'
|
||||
|
||||
choose 'M.'
|
||||
choose 'Monsieur'
|
||||
fill_in('individual_prenom', with: 'prenom')
|
||||
fill_in('individual_nom', with: 'nom')
|
||||
click_on 'Continuer'
|
||||
|
|
|
@ -185,7 +185,7 @@ feature 'The routing', js: true do
|
|||
visit commencer_path(path: procedure.reload.path)
|
||||
click_on 'Commencer la démarche'
|
||||
|
||||
choose 'M.'
|
||||
choose 'Monsieur'
|
||||
fill_in 'individual_nom', with: 'Nom'
|
||||
fill_in 'individual_prenom', with: 'Prenom'
|
||||
click_button('Continuer')
|
||||
|
|
|
@ -329,7 +329,7 @@ feature 'The user' do
|
|||
end
|
||||
|
||||
def fill_individual
|
||||
choose 'M.'
|
||||
choose 'Monsieur'
|
||||
fill_in('individual_prenom', with: 'prenom')
|
||||
fill_in('individual_nom', with: 'nom')
|
||||
click_on 'Continuer'
|
||||
|
|
|
@ -20,7 +20,7 @@ feature 'Creating a new dossier:' do
|
|||
expect(page).to have_current_path identite_dossier_path(user.reload.dossiers.last)
|
||||
expect(page).to have_procedure_description(procedure)
|
||||
|
||||
choose 'M.'
|
||||
choose 'Monsieur'
|
||||
fill_in 'individual_nom', with: 'Nom'
|
||||
fill_in 'individual_prenom', with: 'Prenom'
|
||||
end
|
||||
|
|
|
@ -57,7 +57,7 @@ feature 'linked dropdown lists' do
|
|||
end
|
||||
|
||||
def fill_individual
|
||||
choose 'M.'
|
||||
choose 'Monsieur'
|
||||
fill_in('individual_prenom', with: 'prenom')
|
||||
fill_in('individual_nom', with: 'nom')
|
||||
click_on 'Continuer'
|
||||
|
|
Loading…
Reference in a new issue