ensure the mandatory star hint is always displayed

This commit is contained in:
simon lehericey 2022-08-09 10:29:41 +02:00
parent 898badb579
commit 00d0813292
3 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
#{champ.libelle} #{champ.libelle}
- if champ.mandatory? - if champ.type_de_champ.mandatory?
%span.mandatory * %span.mandatory *
- if champ.updated_at.present? && seen_at.present? - if champ.updated_at.present? && seen_at.present?

View file

@ -7,7 +7,7 @@
.secondary{ class: champ.has_secondary_options_for_primary? ? '' : 'hidden' } .secondary{ class: champ.has_secondary_options_for_primary? ? '' : 'hidden' }
= form.label :secondary_value, for: "#{champ.input_id}-secondary" do = form.label :secondary_value, for: "#{champ.input_id}-secondary" do
= champ.drop_down_secondary_libelle.presence || "Valeur secondaire dépendant de la première" = champ.drop_down_secondary_libelle.presence || "Valeur secondaire dépendant de la première"
- if champ.mandatory? - if champ.type_de_champ.mandatory?
%span.mandatory * %span.mandatory *
- if champ.drop_down_secondary_description.present? - if champ.drop_down_secondary_description.present?
.notice{ id: "#{champ.describedby_id}-secondary" }= string_to_html(champ.drop_down_secondary_description) .notice{ id: "#{champ.describedby_id}-secondary" }= string_to_html(champ.drop_down_secondary_description)

View file

@ -299,7 +299,7 @@ describe 'The user' do
fill_individual fill_individual
fill_in('age', with: '18') fill_in('age', with: '18')
expect(page).to have_css('label', text: 'nom', visible: :visible) expect(page).to have_css('label', text: 'nom *', visible: :visible)
click_on 'Déposer le dossier' click_on 'Déposer le dossier'
expect(page).to have_current_path(brouillon_dossier_path(user_dossier)) expect(page).to have_current_path(brouillon_dossier_path(user_dossier))