diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 498633860..8700d4539 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -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 diff --git a/app/mailers/notification_mailer.rb b/app/mailers/notification_mailer.rb index e01a681e4..6fc9d4dbd 100644 --- a/app/mailers/notification_mailer.rb +++ b/app/mailers/notification_mailer.rb @@ -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("

") ) end diff --git a/app/models/commentaire.rb b/app/models/commentaire.rb index be89d2ef8..e362fa8b0 100644 --- a/app/models/commentaire.rb +++ b/app/models/commentaire.rb @@ -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 diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index d2ed0870a..1eae6f9ab 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -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}" diff --git a/app/views/layouts/_new_footer.html.haml b/app/views/layouts/_new_footer.html.haml index 462609955..33ed6d2cc 100644 --- a/app/views/layouts/_new_footer.html.haml +++ b/app/views/layouts/_new_footer.html.haml @@ -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" diff --git a/app/views/root/landing.html.haml b/app/views/root/landing.html.haml index 7fd087644..38bed2226 100644 --- a/app/views/root/landing.html.haml +++ b/app/views/root/landing.html.haml @@ -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" diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 1ac79d92e..79919ad70 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -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' diff --git a/config/locales/dynamics/fr.yml b/config/locales/dynamics/fr.yml index fdc533e38..9932fc82b 100644 --- a/config/locales/dynamics/fr.yml +++ b/config/locales/dynamics/fr.yml @@ -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' diff --git a/lib/tasks/2018_05_30_missed_ar_messages.rake b/lib/tasks/2018_05_30_missed_ar_messages.rake index 6f2cf858e..e3e7a4b90 100644 --- a/lib/tasks/2018_05_30_missed_ar_messages.rake +++ b/lib/tasks/2018_05_30_missed_ar_messages.rake @@ -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}]

#{body}", created_at: date )