Remove the contact_email locale

This commit is contained in:
gregoirenovel 2018-05-31 15:45:25 +02:00
parent 185f08f63e
commit 23931a7591
9 changed files with 8 additions and 9 deletions

View file

@ -1,4 +1,4 @@
class ApplicationMailer < ActionMailer::Base
default from: "demarches-simplifiees.fr <#{I18n.t('dynamics.contact_email')}>"
default from: "demarches-simplifiees.fr <#{CONTACT_EMAIL}>"
layout 'mailer'
end

View file

@ -54,7 +54,7 @@ class NotificationMailer < ApplicationMailer
def create_commentaire_for_notification(dossier, subject, body)
Commentaire.create(
dossier: dossier,
email: I18n.t("dynamics.contact_email"),
email: CONTACT_EMAIL,
body: ["[#{subject}]", body].join("<br><br>")
)
end

View file

@ -36,7 +36,7 @@ class Commentaire < ApplicationRecord
# - If a user or an invited user posted a commentaire, do nothing,
# the notification system will properly
# - Otherwise, a gestionnaire posted a commentaire, we need to notify the user
if !email.in?([I18n.t("dynamics.contact_email"), dossier_user_email, *invited_users_emails])
if !email.in?([CONTACT_EMAIL, dossier_user_email, *invited_users_emails])
notify_user
end
end

View file

@ -9,4 +9,4 @@
\-
= link_to 'CGU / Mentions légales', CGU_URL
\-
= link_to 'Contact', "mailto:"+t('dynamics.contact_email')
= link_to 'Contact', "mailto:#{CONTACT_EMAIL}"

View file

@ -30,7 +30,7 @@
%ul.footer-links
%li.footer-link
= link_to "Contact",
"mailto:#{t('dynamics.contact_email')}",
"mailto:#{CONTACT_EMAIL}",
:class => "footer-link"
%li.footer-link
= link_to "Documentation", DOC_URL, :class => "footer-link", :target => "_blank", rel: "noopener noreferrer"

View file

@ -204,7 +204,7 @@
%p.cta-panel-explanation Notre équipe est disponible pour vous renseigner et vous aider
%div
= link_to "Contactez-nous",
"mailto:#{t("dynamics.contact_email")}?subject=Question%20à%20propos%20de%20demarches-simplifiees.fr",
"mailto:#{CONTACT_EMAIL}?subject=Question%20à%20propos%20de%20demarches-simplifiees.fr",
class: "cta-panel-button-white",
target: "_blank",
rel: "noopener noreferrer"

View file

@ -12,7 +12,7 @@ Devise.setup do |config|
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender = "demarches-simplifiees.fr <#{I18n.t('dynamics.contact_email')}>"
config.mailer_sender = "demarches-simplifiees.fr <#{CONTACT_EMAIL}>"
# Configure the class responsible to send e-mails.
config.mailer = 'DeviseUserMailer'

View file

@ -1,7 +1,6 @@
fr:
dynamics:
page_title: demarches-simplifiees.fr
contact_email: contact@demarches-simplifiees.fr
users:
connexion_title: Connexion
mes_dossiers: 'Mes dossiers'

View file

@ -21,7 +21,7 @@ namespace :'2018_05_30_missed_ar_messages' do
Commentaire.create(
dossier: dossier,
email: I18n.t("dynamics.contact_email"),
email: CONTACT_EMAIL,
body: "[#{subject}]<br><br>#{body}",
created_at: date
)