fix password reset with bad password scenario
This commit is contained in:
parent
eaef5c7e39
commit
ce095479b7
7 changed files with 8 additions and 34 deletions
|
@ -1,16 +1,7 @@
|
||||||
%p
|
= form_tag france_connect_particulier_merge_using_password_path, data: { turbo: true }, class: 'mt-2 form fconnect-form', id: 'merge_using_password' do
|
||||||
= t('.already_exists', email: email, application_name: Current.application_name)
|
= hidden_field_tag :merge_token, fci.merge_token, id: dom_id(fci, :fusion_merge_token)
|
||||||
%br
|
.fr-input-group{ class: class_names('fr-input-group--error': wrong_password) }
|
||||||
= t('.fill_in_password')
|
= label_tag :password, t('views.registrations.new.password_label', min_length: 8), class: 'fr-label'
|
||||||
|
= password_field_tag :password, nil, autocomplete: 'current-password', class: 'mb-1 fr-input'
|
||||||
|
|
||||||
= form_tag france_connect_particulier_merge_with_existing_account_path, data: { turbo: true, turbo_force: :server }, class: 'mt-2 form fconnect-form' do
|
= submit_tag t('france_connect.particulier.merge.button_merge'), class: 'fr-btn'
|
||||||
= hidden_field_tag :merge_token, merge_token
|
|
||||||
= hidden_field_tag :email, email
|
|
||||||
= label_tag :password, t('views.registrations.new.password_label', min_length: 8)
|
|
||||||
= password_field_tag :password, nil, autocomplete: 'current-password', id: 'password-for-another-account'
|
|
||||||
.mb-2
|
|
||||||
= t('views.users.sessions.new.reset_password')
|
|
||||||
= link_to france_connect_particulier_send_email_merge_path(merge_token: merge_token), method: :post do
|
|
||||||
= t('france_connect.particulier.merge.link_confirm_by_email')
|
|
||||||
= button_tag t('.back'), type: 'button', class: 'button secondary', onclick: 'DS.showNewAccount(event);'
|
|
||||||
= submit_tag t('france_connect.particulier.merge.button_merge'), class: 'button primary'
|
|
||||||
|
|
|
@ -20,13 +20,7 @@
|
||||||
.fusion.hidden
|
.fusion.hidden
|
||||||
%p= t('.title_fill_in_password')
|
%p= t('.title_fill_in_password')
|
||||||
|
|
||||||
= form_tag france_connect_particulier_merge_using_password_path, data: { turbo: true }, class: 'mt-2 form fconnect-form' do
|
= render partial: 'password_confirmation', locals: { fci: @fci, wrong_password: @wrong_password }
|
||||||
= hidden_field_tag :merge_token, @fci.merge_token, id: dom_id(@fci, :fusion_merge_token)
|
|
||||||
.fr-input-group
|
|
||||||
= label_tag :password, t('views.registrations.new.password_label', min_length: 8), class: 'fr-label'
|
|
||||||
= password_field_tag :password, nil, autocomplete: 'current-password', class: 'mb-1 fr-input'
|
|
||||||
|
|
||||||
= submit_tag t('.button_merge'), class: 'fr-btn'
|
|
||||||
|
|
||||||
.mt-2
|
.mt-2
|
||||||
= button_to t('.link_confirm_by_email'),
|
= button_to t('.link_confirm_by_email'),
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
= turbo_stream.replace('merge_using_password', partial: 'password_confirmation', locals: { fci: @fci, wrong_password: true })
|
|
@ -1,4 +0,0 @@
|
||||||
= turbo_stream.update 'new-account-password-confirmation', partial: 'password_confirmation', locals: { email: @email, merge_token: @merge_token }
|
|
||||||
= turbo_stream.hide_all '.fusion'
|
|
||||||
= turbo_stream.hide_all '.new-account'
|
|
||||||
= turbo_stream.show 'new-account-password-confirmation'
|
|
|
@ -897,10 +897,6 @@ en:
|
||||||
intro: "A confirmation email has been sent to your address %{email}"
|
intro: "A confirmation email has been sent to your address %{email}"
|
||||||
click_the_link_in_the_email: "Please click the link in the email to confirm your account and connect with France Connect in the future."
|
click_the_link_in_the_email: "Please click the link in the email to confirm your account and connect with France Connect in the future."
|
||||||
continue: "Continue"
|
continue: "Continue"
|
||||||
password_confirmation:
|
|
||||||
back: 'back to previous step'
|
|
||||||
already_exists: An account with %{email} already existis on %{application_name}
|
|
||||||
fill_in_password: fill in your password to merge your accounts
|
|
||||||
merge:
|
merge:
|
||||||
title: "Merge your account FranceConnect and %{application_name}"
|
title: "Merge your account FranceConnect and %{application_name}"
|
||||||
subtitle_html: "Hello,<br /><br />Your account FranceConnect uses <b class='bold'>%{email}</b> as contact email.<br />But there is an existing %{application_name} account using this email."
|
subtitle_html: "Hello,<br /><br />Your account FranceConnect uses <b class='bold'>%{email}</b> as contact email.<br />But there is an existing %{application_name} account using this email."
|
||||||
|
|
|
@ -952,10 +952,6 @@ fr:
|
||||||
intro: Un mail de confirmation a été envoyé à votre adresse %{email}
|
intro: Un mail de confirmation a été envoyé à votre adresse %{email}
|
||||||
click_the_link_in_the_email: Vous devez impérativement cliquer sur le lien du mail pour activer votre adresse et recevoir les notifications sur l'avancement de vos dossiers.
|
click_the_link_in_the_email: Vous devez impérativement cliquer sur le lien du mail pour activer votre adresse et recevoir les notifications sur l'avancement de vos dossiers.
|
||||||
continue: Continuer
|
continue: Continuer
|
||||||
password_confirmation:
|
|
||||||
back: 'revenir en arrière'
|
|
||||||
already_exists: Le compte %{email} existe déjà sur %{application_name}
|
|
||||||
fill_in_password: entrez votre mot de passe pour fusionner les comptes
|
|
||||||
merge:
|
merge:
|
||||||
title: "Fusion des comptes FranceConnect et %{application_name}"
|
title: "Fusion des comptes FranceConnect et %{application_name}"
|
||||||
subtitle_html: "Bonjour,<br /><br />Votre compte FranceConnect utilise <b class='bold'>%{email}</b> comme email de contact.<br />Or il existe un compte sur %{application_name} avec cet email."
|
subtitle_html: "Bonjour,<br /><br />Votre compte FranceConnect utilise <b class='bold'>%{email}</b> comme email de contact.<br />Or il existe un compte sur %{application_name} avec cet email."
|
||||||
|
|
Loading…
Reference in a new issue