43 lines
2.6 KiB
Text
43 lines
2.6 KiB
Text
.fr-container
|
|
%h1.text-center.mt-1= t('.choose_email_contact')
|
|
|
|
%p= t('.greetings')
|
|
|
|
%p= t('.intro_html', email: france_connect_email)
|
|
|
|
= form_with url: france_connect_particulier_associate_user_path, method: :post, data: { controller: "email-france-connect" } do |f|
|
|
= hidden_field_tag :france_connect_email, france_connect_email
|
|
= hidden_field_tag :merge_token, merge_token
|
|
|
|
%fieldset.fr-fieldset{ aria: { labelledby: 'notifications-or-not-notification' } }
|
|
%legend.fr-fieldset__legend#notifications-or-not-notification= t('.use_email_for_notifications')
|
|
.fr-fieldset__element.fr-fieldset__element--inline
|
|
.fr-radio-group
|
|
= f.radio_button :use_france_connect_email, true, id: 'use_france_connect_email_yes', class: 'fr-radio', required: true, data: { action: "email-france-connect#triggerEmailField", email_france_connect_target: "useFranceConnectEmail" }
|
|
%label.fr-label{ for: 'use_france_connect_email_yes' }
|
|
= t('utils.yes')
|
|
.fr-fieldset__element.fr-fieldset__element--inline
|
|
.fr-radio-group
|
|
= f.radio_button :use_france_connect_email, false, id: 'use_france_connect_email_no', class: 'fr-radio', required: true, data: { action: "email-france-connect#triggerEmailField", email_france_connect_target: "useFranceConnectEmail" }
|
|
%label.fr-label{ for: 'use_france_connect_email_no' }
|
|
= t('utils.no')
|
|
|
|
.fr-fieldset.fr-w-30v
|
|
.fr-fieldset__element.fr-fieldset__element--inline.fr-hidden{ data: { email_france_connect_target: "emailField", controller: 'email-input', email_input_url_value: show_email_suggestions_path } }
|
|
= f.label :alternative_email, t('.alternative_email'), class: "fr-label"
|
|
%span.fr-hint-text.mb-1= t('activerecord.attributes.user.hints.email')
|
|
= f.email_field :alternative_email, class: "fr-input", data: { action: "blur->email-input#checkEmail", 'email-input-target': 'input' }
|
|
|
|
.suspect-email.hidden{ data: { "email-input-target": 'ariaRegion'}, aria: { live: 'off' } }
|
|
= render Dsfr::AlertComponent.new(title: t('utils.email_suggest.wanna_say'), state: :info, heading_level: :div) do |c|
|
|
- c.with_body do
|
|
%p{ data: { "email-input-target": 'suggestion'} } exemple@gmail.com ?
|
|
%p
|
|
= button_tag type: 'button', class: 'fr-btn fr-btn--sm fr-mr-3w', data: { action: 'click->email-input#accept'} do
|
|
= t('utils.yes')
|
|
= button_tag type: 'button', class: 'fr-btn fr-btn--sm', data: { action: 'click->email-input#discard'} do
|
|
= t('utils.no')
|
|
|
|
|
|
%div
|
|
= f.submit t('.confirm'), class: 'fr-btn'
|