fix: heading level of france connect title depends on context

This commit is contained in:
Colin Darie 2024-09-23 12:29:48 +02:00
parent 2c69f93edd
commit 84fbb4c6ad
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
2 changed files with 2 additions and 2 deletions

View file

@ -4,7 +4,7 @@
- if !user_signed_in? - if !user_signed_in?
= render Dsfr::CalloutComponent.new(title: t(".start_procedure"), heading_level: 'h2') do |c| = render Dsfr::CalloutComponent.new(title: t(".start_procedure"), heading_level: 'h2') do |c|
- c.with_html_body do - c.with_html_body do
= render partial: 'shared/france_connect_login', locals: { url: commencer_france_connect_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token) } = render partial: 'shared/france_connect_login', locals: { url: commencer_france_connect_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), heading_level: :h3 }
%ul.fr-btns-group.fr-btns-group--inline %ul.fr-btns-group.fr-btns-group--inline
%li %li
= link_to commencer_sign_up_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), class: 'fr-btn' do = link_to commencer_sign_up_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), class: 'fr-btn' do

View file

@ -1,6 +1,6 @@
- if FranceConnectService.enabled? - if FranceConnectService.enabled?
.france-connect-login .france-connect-login
%h3.fr-h6 = tag.public_send(local_assigns.fetch(:heading_level, :h2), class: "fr-h6") do
= t('views.shared.france_connect_login.title') = t('views.shared.france_connect_login.title')
%p %p
= t('views.shared.france_connect_login.description') = t('views.shared.france_connect_login.description')