demarches-normaliennes/app/views/devise_mailer/confirmation_instructions.html.haml
Pierre de La Morinerie 6664965961 mailers: add procedure context to the confirmation link
This allows to redirect the user to the procedure they signed up for
even when the browser session is not available (like if they changed
of browser).

Fix #4738
2020-02-25 11:45:36 +00:00

23 lines
767 B
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-# ugly hack to know if the mail is creation confirmation or a password change confirmation
- if @user.unconfirmed_email.nil?
- content_for(:title, 'Activez votre compte')
%p
Bonjour,
%p
Pour activer votre compte sur demarches-simplifiees.fr, veuillez cliquer sur le lien suivant :
- link = confirmation_url(@user, confirmation_token: @token, procedure_id: @procedure&.id)
= link_to(link, link)
- else
- content_for(:title, "Changement d'adresse email")
%p
Bonjour,
%p
Pour confirmer votre changement d'adresse email, veuillez cliquer sur le lien suivant :
= link_to(confirmation_url(@user, confirmation_token: @token), confirmation_url(@user, confirmation_token: @token))
= render partial: "layouts/mailers/signature"