2024-09-17 15:01:01 +02:00
|
|
|
.fr-container.fr-my-5w
|
|
|
|
.fr-grid-row.fr-col-offset-md-2.fr-col-md-8
|
|
|
|
.fr-col-12
|
2024-07-01 14:38:47 +00:00
|
|
|
|
2024-09-17 15:01:01 +02:00
|
|
|
%h1.text-center.mt-1= t('.choose_email_contact')
|
2024-07-01 14:38:47 +00:00
|
|
|
|
2024-09-17 15:01:01 +02:00
|
|
|
%p= t('.intro_html', email: @fci.email_france_connect)
|
2024-07-01 14:38:47 +00:00
|
|
|
|
2024-09-17 15:01:01 +02:00
|
|
|
%p= t('.use_email_for_notifications')
|
2024-07-31 17:50:14 +02:00
|
|
|
|
2024-08-12 09:48:14 +00:00
|
|
|
%fieldset.fr-fieldset
|
2024-11-22 15:44:28 +01:00
|
|
|
= form_with url: france_connect_particulier_merge_using_fc_email_path,
|
|
|
|
method: :post,
|
2024-11-22 17:17:11 +01:00
|
|
|
data: { controller: 'email-france-connect',
|
|
|
|
email_france_connect_fc_email_path_value: france_connect_particulier_merge_using_fc_email_path,
|
|
|
|
email_france_connect_custom_email_path_value: france_connect_particulier_send_email_merge_request_path,
|
|
|
|
email_france_connect_target: "form" } do |f|
|
2024-11-22 15:44:28 +01:00
|
|
|
|
2024-09-17 15:01:01 +02:00
|
|
|
= hidden_field_tag :merge_token, @fci.merge_token
|
2024-08-12 09:48:14 +00:00
|
|
|
|
2024-09-17 15:01:01 +02:00
|
|
|
%fieldset.fr-fieldset
|
|
|
|
%legend.fr-fieldset__legend
|
|
|
|
.fr-fieldset__element
|
|
|
|
.fr-radio-group
|
2024-11-22 15:44:28 +01:00
|
|
|
= f.radio_button :use_france_connect_email, true,
|
|
|
|
id: 'use_france_connect_email_yes',
|
|
|
|
class: 'fr-radio',
|
|
|
|
required: true,
|
2024-11-22 16:54:21 +01:00
|
|
|
data: { action: "email-france-connect#triggerEmailField email-france-connect#triggerSubmitDisabled",
|
|
|
|
email_france_connect_target: "useFranceConnectEmail" }
|
2024-09-17 15:01:01 +02:00
|
|
|
%label.fr-label.fr-text--wrap{ for: 'use_france_connect_email_yes' }
|
2024-11-22 16:24:54 +01:00
|
|
|
= t('.keep_fc_email_html', email: h(@fci.email_france_connect))
|
2024-11-22 15:44:28 +01:00
|
|
|
|
2024-09-17 15:01:01 +02:00
|
|
|
.fr-fieldset__element
|
|
|
|
.fr-radio-group
|
2024-11-22 15:44:28 +01:00
|
|
|
= f.radio_button :use_france_connect_email, false,
|
|
|
|
id: 'use_france_connect_email_no',
|
|
|
|
class: 'fr-radio',
|
|
|
|
required: true,
|
2024-11-22 16:54:21 +01:00
|
|
|
data: { action: "email-france-connect#triggerEmailField email-france-connect#triggerSubmitDisabled", email_france_connect_target: "useFranceConnectEmail" }
|
2024-09-17 15:01:01 +02:00
|
|
|
%label.fr-label.fr-text--wrap{ for: 'use_france_connect_email_no' }
|
|
|
|
= t('.use_another_email')
|
2024-07-24 15:57:26 +02:00
|
|
|
|
2024-11-22 16:54:21 +01:00
|
|
|
.fr-fieldset__element.fr-fieldset__element--inline.hidden{
|
|
|
|
aria: { hidden: true },
|
|
|
|
data: {
|
|
|
|
email_france_connect_target: "emailField",
|
|
|
|
controller: 'email-input',
|
|
|
|
email_input_url_value: show_email_suggestions_path
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-09-17 15:01:01 +02:00
|
|
|
= f.label :email, t('.alternative_email'), class: "fr-label"
|
|
|
|
%span.fr-hint-text.mb-1= t('activerecord.attributes.user.hints.email')
|
2024-11-22 16:54:21 +01:00
|
|
|
= f.email_field :email,
|
|
|
|
data: { action: "email-france-connect#triggerSubmitDisabled", email_france_connect_target: "emailInput" },
|
|
|
|
class: "fr-input"
|
2024-09-17 15:01:01 +02:00
|
|
|
|
|
|
|
.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
|
2024-11-22 16:54:21 +01:00
|
|
|
= f.submit t('.confirm'),
|
|
|
|
class: 'fr-btn',
|
|
|
|
data: { email_france_connect_target: "submit" },
|
|
|
|
disabled: true
|