ff073f8884
feat(fci.confirmation_code): add confirmation code to france_connect_informations feat(user_mailer.france_connect_confirmation_code): add confirmation by email mail method/preview/spec, pointing to merge_mail_with_existing_account (reuse existing method) feat(mail_merge): mail merge feat(merge.cannot_use_france_connect): same behaviour as callback clean(fci.confirmation_code): use same token for mail validation as merge feat(resend_france_connect/particulier/merge_confirmation): resend email with link. also enhance some trads, cleanup halfy finished refacto clean(tech): finalize story by plugging merge_with_new_account to email validation fix(deadspec): was removed fix(spec): broken after last refactoring lint(rubocop): space before parenthesis lint(haml-lint): yoohoooo space before = fix(lint): scss now :D Update app/assets/stylesheets/buttons.scss cleanup feat(france_connect): re-add confirm by email, with an option for confirmation by email instead of only confirmation by email fixup! Add confirmation by email when merging DC/FC accounts fix(lint): haml_spec failure
39 lines
1,018 B
Ruby
39 lines
1,018 B
Ruby
# Preview all emails at http://localhost:3000/rails/mailers/user_mailer
|
|
class UserMailer < ApplicationMailer
|
|
helper MailerHelper
|
|
|
|
layout 'mailers/layout'
|
|
|
|
def new_account_warning(user, procedure = nil)
|
|
@user = user
|
|
@subject = "Demande de création de compte"
|
|
@procedure = procedure
|
|
|
|
mail(to: user.email, subject: @subject, procedure: @procedure)
|
|
end
|
|
|
|
def ask_for_merge(user, requested_email)
|
|
@user = user
|
|
@requested_email = requested_email
|
|
@subject = "Fusion de compte"
|
|
|
|
mail(to: requested_email, subject: @subject)
|
|
end
|
|
|
|
def france_connect_merge_confirmation(email, merge_token)
|
|
@merge_token = merge_token
|
|
@subject = "Veuillez confirmer la fusion de compte"
|
|
|
|
mail(to: email, subject: @subject)
|
|
end
|
|
|
|
def invite_instructeur(user, reset_password_token)
|
|
@reset_password_token = reset_password_token
|
|
@user = user
|
|
subject = "Activez votre compte instructeur"
|
|
|
|
mail(to: user.email,
|
|
subject: subject,
|
|
reply_to: CONTACT_EMAIL)
|
|
end
|
|
end
|