Merge branch 'dev'
This commit is contained in:
commit
7660f5890a
32 changed files with 91 additions and 66 deletions
5
Gemfile
5
Gemfile
|
@ -104,10 +104,7 @@ gem 'aasm'
|
||||||
gem 'delayed_job_active_record'
|
gem 'delayed_job_active_record'
|
||||||
gem "daemons"
|
gem "daemons"
|
||||||
gem 'delayed_cron_job'
|
gem 'delayed_cron_job'
|
||||||
# FIXME: this is a fork, go back to official version
|
gem "delayed_job_web"
|
||||||
# once https://github.com/ejschmitt/delayed_job_web/issues/101
|
|
||||||
# has been merged and released
|
|
||||||
gem "delayed_job_web", git: 'https://github.com/breckenedge/delayed_job_web.git', branch: 'cve_2017_12097'
|
|
||||||
gem 'select2-rails'
|
gem 'select2-rails'
|
||||||
|
|
||||||
# PDF Generation
|
# PDF Generation
|
||||||
|
|
16
Gemfile.lock
16
Gemfile.lock
|
@ -1,13 +1,3 @@
|
||||||
GIT
|
|
||||||
remote: https://github.com/breckenedge/delayed_job_web.git
|
|
||||||
revision: 6bcb10e61ea2b9a44ffa16be8536dff46ad51449
|
|
||||||
branch: cve_2017_12097
|
|
||||||
specs:
|
|
||||||
delayed_job_web (1.4)
|
|
||||||
activerecord (> 3.0.0)
|
|
||||||
delayed_job (> 2.0.3)
|
|
||||||
sinatra (>= 1.4.4)
|
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: https://github.com/hassox/warden.git
|
remote: https://github.com/hassox/warden.git
|
||||||
revision: 5b3cbd5bef67cbe399bb7007537bc4841bbee772
|
revision: 5b3cbd5bef67cbe399bb7007537bc4841bbee772
|
||||||
|
@ -169,6 +159,10 @@ GEM
|
||||||
delayed_job_active_record (4.1.3)
|
delayed_job_active_record (4.1.3)
|
||||||
activerecord (>= 3.0, < 5.3)
|
activerecord (>= 3.0, < 5.3)
|
||||||
delayed_job (>= 3.0, < 5)
|
delayed_job (>= 3.0, < 5)
|
||||||
|
delayed_job_web (1.4.2)
|
||||||
|
activerecord (> 3.0.0)
|
||||||
|
delayed_job (> 2.0.3)
|
||||||
|
sinatra (>= 2.0.1)
|
||||||
devise (4.4.3)
|
devise (4.4.3)
|
||||||
bcrypt (~> 3.0)
|
bcrypt (~> 3.0)
|
||||||
orm_adapter (~> 0.1)
|
orm_adapter (~> 0.1)
|
||||||
|
@ -803,7 +797,7 @@ DEPENDENCIES
|
||||||
deep_cloneable
|
deep_cloneable
|
||||||
delayed_cron_job
|
delayed_cron_job
|
||||||
delayed_job_active_record
|
delayed_job_active_record
|
||||||
delayed_job_web!
|
delayed_job_web
|
||||||
devise
|
devise
|
||||||
devise-async
|
devise-async
|
||||||
dotenv-rails
|
dotenv-rails
|
||||||
|
|
|
@ -46,7 +46,7 @@ class Admin::ProceduresController < AdminController
|
||||||
procedure = current_administrateur.procedures.find(params[:id])
|
procedure = current_administrateur.procedures.find(params[:id])
|
||||||
procedure.hide!
|
procedure.hide!
|
||||||
|
|
||||||
flash.notice = "Procédure supprimée, en cas d'erreur contactez nous : contact@demarches-simplifiees.fr"
|
flash.notice = "Procédure supprimée, en cas d'erreur contactez nous : #{CONTACT_EMAIL}"
|
||||||
redirect_to admin_procedures_draft_path
|
redirect_to admin_procedures_draft_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -164,8 +164,8 @@ class Admin::ProceduresController < AdminController
|
||||||
flash.alert = new_procedure.errors.full_messages
|
flash.alert = new_procedure.errors.full_messages
|
||||||
redirect_to new_from_existing_admin_procedures_path
|
redirect_to new_from_existing_admin_procedures_path
|
||||||
else
|
else
|
||||||
flash.now.alert = new_procedure.errors.full_messages
|
flash.alert = new_procedure.errors.full_messages
|
||||||
render 'index'
|
redirect_to admin_procedures_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ class Administrateurs::ActivateController < ApplicationController
|
||||||
@administrateur = Administrateur.find_inactive_by_token(params[:token])
|
@administrateur = Administrateur.find_inactive_by_token(params[:token])
|
||||||
|
|
||||||
if !@administrateur
|
if !@administrateur
|
||||||
flash.alert = "Le lien de validation d'administrateur a expiré, contactez-nous à contact@demarches-simplifiees.fr pour obtenir un nouveau lien."
|
flash.alert = "Le lien de validation d'administrateur a expiré, contactez-nous à #{CONTACT_EMAIL} pour obtenir un nouveau lien."
|
||||||
redirect_to root_path
|
redirect_to root_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@ class Gestionnaires::ActivateController < ApplicationController
|
||||||
@gestionnaire = Gestionnaire.with_reset_password_token(params[:token])
|
@gestionnaire = Gestionnaire.with_reset_password_token(params[:token])
|
||||||
|
|
||||||
if !@gestionnaire
|
if !@gestionnaire
|
||||||
flash.alert = "Le lien de validation du compte accompagnateur a expiré, contactez-nous à contact@demarches-simplifiees.fr pour obtenir un nouveau lien."
|
flash.alert = "Le lien de validation du compte accompagnateur a expiré, contactez-nous à #{CONTACT_EMAIL} pour obtenir un nouveau lien."
|
||||||
redirect_to root_path
|
redirect_to root_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,8 +5,10 @@ class AdministrateurMailer < ApplicationMailer
|
||||||
@administrateur = administrateur
|
@administrateur = administrateur
|
||||||
@reset_password_token = reset_password_token
|
@reset_password_token = reset_password_token
|
||||||
@expiration_date = @administrateur.reset_password_sent_at + Devise.reset_password_within
|
@expiration_date = @administrateur.reset_password_sent_at + Devise.reset_password_within
|
||||||
|
subject = "demarches-simplifiees.fr - N'oubliez pas d'activer votre compte administrateur"
|
||||||
|
|
||||||
mail(to: administrateur.email,
|
mail(to: administrateur.email,
|
||||||
subject: "demarches-simplifiees.fr - N'oubliez pas d'activer votre compte administrateur",
|
subject: subject,
|
||||||
reply_to: "contact@demarches-simplifiees.fr")
|
reply_to: CONTACT_EMAIL)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,28 +4,35 @@ class AdministrationMailer < ApplicationMailer
|
||||||
def new_admin_email(admin, administration)
|
def new_admin_email(admin, administration)
|
||||||
@admin = admin
|
@admin = admin
|
||||||
@administration = administration
|
@administration = administration
|
||||||
|
subject = "Création d'un compte Admin demarches-simplifiees.fr"
|
||||||
|
|
||||||
mail(to: 'tech@demarches-simplifiees.fr',
|
mail(to: TECH_EMAIL,
|
||||||
subject: "Création d'un compte Admin demarches-simplifiees.fr")
|
subject: subject)
|
||||||
end
|
end
|
||||||
|
|
||||||
def invite_admin(admin, reset_password_token)
|
def invite_admin(admin, reset_password_token)
|
||||||
@reset_password_token = reset_password_token
|
@reset_password_token = reset_password_token
|
||||||
@admin = admin
|
@admin = admin
|
||||||
|
subject = "demarches-simplifiees.fr - Activez votre compte administrateur"
|
||||||
|
|
||||||
mail(to: admin.email,
|
mail(to: admin.email,
|
||||||
subject: "demarches-simplifiees.fr - Activez votre compte administrateur",
|
subject: subject,
|
||||||
reply_to: "contact@demarches-simplifiees.fr")
|
reply_to: CONTACT_EMAIL)
|
||||||
end
|
end
|
||||||
|
|
||||||
def refuse_admin(admin_email)
|
def refuse_admin(admin_email)
|
||||||
|
subject = "demarches-simplifiees.fr - Votre demande de compte a été refusée"
|
||||||
|
|
||||||
mail(to: admin_email,
|
mail(to: admin_email,
|
||||||
subject: "demarches-simplifiees.fr - Votre demande de compte a été refusée",
|
subject: subject,
|
||||||
reply_to: "contact@demarches-simplifiees.fr")
|
reply_to: CONTACT_EMAIL)
|
||||||
end
|
end
|
||||||
|
|
||||||
def dubious_procedures(procedures_and_type_de_champs)
|
def dubious_procedures(procedures_and_type_de_champs)
|
||||||
@procedures_and_type_de_champs = procedures_and_type_de_champs
|
@procedures_and_type_de_champs = procedures_and_type_de_champs
|
||||||
mail(to: 'equipe@demarches-simplifiees.fr',
|
subject = "[RGS] De nouvelles procédures comportent des champs interdits"
|
||||||
subject: "[RGS] De nouvelles procédures comportent des champs interdits")
|
|
||||||
|
mail(to: EQUIPE_EMAIL,
|
||||||
|
subject: subject)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class ApplicationMailer < ActionMailer::Base
|
class ApplicationMailer < ActionMailer::Base
|
||||||
default from: "demarches-simplifiees.fr <#{I18n.t('dynamics.contact_email')}>"
|
default from: "demarches-simplifiees.fr <#{CONTACT_EMAIL}>"
|
||||||
layout 'mailer'
|
layout 'mailer'
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,6 +2,8 @@ class AvisMailer < ApplicationMailer
|
||||||
def avis_invitation(avis)
|
def avis_invitation(avis)
|
||||||
@avis = avis
|
@avis = avis
|
||||||
email = @avis.gestionnaire&.email || @avis.email
|
email = @avis.gestionnaire&.email || @avis.email
|
||||||
mail(to: email, subject: "Donnez votre avis sur le dossier nº #{@avis.dossier.id} (#{@avis.dossier.procedure.libelle})")
|
subject = "Donnez votre avis sur le dossier nº #{@avis.dossier.id} (#{@avis.dossier.procedure.libelle})"
|
||||||
|
|
||||||
|
mail(to: email, subject: subject)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,11 +3,15 @@ class DossierMailer < ApplicationMailer
|
||||||
|
|
||||||
def notify_deletion_to_user(deleted_dossier, to_email)
|
def notify_deletion_to_user(deleted_dossier, to_email)
|
||||||
@deleted_dossier = deleted_dossier
|
@deleted_dossier = deleted_dossier
|
||||||
mail(to: to_email, subject: "Votre dossier n° #{@deleted_dossier.dossier_id} a bien été supprimé")
|
subject = "Votre dossier n° #{@deleted_dossier.dossier_id} a bien été supprimé"
|
||||||
|
|
||||||
|
mail(to: to_email, subject: subject)
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_deletion_to_administration(deleted_dossier, to_email)
|
def notify_deletion_to_administration(deleted_dossier, to_email)
|
||||||
@deleted_dossier = deleted_dossier
|
@deleted_dossier = deleted_dossier
|
||||||
mail(to: to_email, subject: "Le dossier n° #{@deleted_dossier.dossier_id} a été supprimé à la demande de l'usager")
|
subject = "Le dossier n° #{@deleted_dossier.dossier_id} a été supprimé à la demande de l'usager"
|
||||||
|
|
||||||
|
mail(to: to_email, subject: subject)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,19 +4,25 @@ class GestionnaireMailer < ApplicationMailer
|
||||||
def invite_gestionnaire(gestionnaire, reset_password_token)
|
def invite_gestionnaire(gestionnaire, reset_password_token)
|
||||||
@reset_password_token = reset_password_token
|
@reset_password_token = reset_password_token
|
||||||
@gestionnaire = gestionnaire
|
@gestionnaire = gestionnaire
|
||||||
|
subject = "demarches-simplifiees.fr - Activez votre compte accompagnateur"
|
||||||
|
|
||||||
mail(to: gestionnaire.email,
|
mail(to: gestionnaire.email,
|
||||||
subject: "demarches-simplifiees.fr - Activez votre compte accompagnateur",
|
subject: subject,
|
||||||
reply_to: "contact@demarches-simplifiees.fr")
|
reply_to: CONTACT_EMAIL)
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_to_gestionnaire(email)
|
def user_to_gestionnaire(email)
|
||||||
send_mail(email, nil, "Vous avez été nommé accompagnateur sur demarches-simplifiees.fr")
|
subject = "Vous avez été nommé accompagnateur sur demarches-simplifiees.fr"
|
||||||
|
|
||||||
|
send_mail(email, nil, subject)
|
||||||
end
|
end
|
||||||
|
|
||||||
def last_week_overview(gestionnaire)
|
def last_week_overview(gestionnaire)
|
||||||
headers['X-mailjet-campaign'] = 'last_week_overview'
|
headers['X-mailjet-campaign'] = 'last_week_overview'
|
||||||
overview = gestionnaire.last_week_overview
|
overview = gestionnaire.last_week_overview
|
||||||
send_mail gestionnaire.email, overview, 'Vos activités sur demarches-simplifiees.fr'
|
subject = 'Vos activités sur demarches-simplifiees.fr'
|
||||||
|
|
||||||
|
send_mail(gestionnaire.email, overview, subject)
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_dossier(sender, dossier, recipient)
|
def send_dossier(sender, dossier, recipient)
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
class InviteMailer < ApplicationMailer
|
class InviteMailer < ApplicationMailer
|
||||||
def invite_user(invite)
|
def invite_user(invite)
|
||||||
vars_mailer invite
|
vars_mailer(invite)
|
||||||
|
subject = "demarches-simplifiees.fr - Participez à l'élaboration d'un dossier"
|
||||||
|
|
||||||
send_mail invite.email, "demarches-simplifiees.fr - Participez à l'élaboration d'un dossier", invite.email_sender if invite.user.present?
|
send_mail(invite.email, subject, invite.email_sender) if invite.user.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
def invite_guest(invite)
|
def invite_guest(invite)
|
||||||
vars_mailer invite
|
vars_mailer(invite)
|
||||||
|
subject = "Invitation - #{invite.email_sender} vous invite à consulter un dossier sur demarches-simplifiees.fr"
|
||||||
|
|
||||||
send_mail invite.email, "Invitation - #{invite.email_sender} vous invite à consulter un dossier sur demarches-simplifiees.fr", invite.email_sender
|
send_mail(invite.email, subject, invite.email_sender)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -54,7 +54,7 @@ class NotificationMailer < ApplicationMailer
|
||||||
def create_commentaire_for_notification(dossier, subject, body)
|
def create_commentaire_for_notification(dossier, subject, body)
|
||||||
Commentaire.create(
|
Commentaire.create(
|
||||||
dossier: dossier,
|
dossier: dossier,
|
||||||
email: I18n.t("dynamics.contact_email"),
|
email: CONTACT_EMAIL,
|
||||||
body: ["[#{subject}]", body].join("<br><br>")
|
body: ["[#{subject}]", body].join("<br><br>")
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,8 @@ class UserMailer < ApplicationMailer
|
||||||
|
|
||||||
def new_account_warning(user)
|
def new_account_warning(user)
|
||||||
@user = user
|
@user = user
|
||||||
mail(to: user.email, subject: "Création de compte")
|
subject = "Création de compte"
|
||||||
|
|
||||||
|
mail(to: user.email, subject: subject)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -36,7 +36,7 @@ class Commentaire < ApplicationRecord
|
||||||
# - If a user or an invited user posted a commentaire, do nothing,
|
# - If a user or an invited user posted a commentaire, do nothing,
|
||||||
# the notification system will properly
|
# the notification system will properly
|
||||||
# - Otherwise, a gestionnaire posted a commentaire, we need to notify the user
|
# - 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
|
notify_user
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -102,8 +102,8 @@ class Gestionnaire < ApplicationRecord
|
||||||
|
|
||||||
messagerie = follow.messagerie_seen_at.present? &&
|
messagerie = follow.messagerie_seen_at.present? &&
|
||||||
dossier.commentaires
|
dossier.commentaires
|
||||||
.where.not(email: 'contact@tps.apientreprise.fr')
|
.where.not(email: OLD_CONTACT_EMAIL)
|
||||||
.where.not(email: 'contact@demarches-simplifiees.fr')
|
.where.not(email: CONTACT_EMAIL)
|
||||||
.updated_since?(follow.messagerie_seen_at).any?
|
.updated_since?(follow.messagerie_seen_at).any?
|
||||||
|
|
||||||
annotations_hash(demande, annotations_privees, avis_notif, messagerie)
|
annotations_hash(demande, annotations_privees, avis_notif, messagerie)
|
||||||
|
@ -208,8 +208,8 @@ class Gestionnaire < ApplicationRecord
|
||||||
updated_messagerie = dossiers
|
updated_messagerie = dossiers
|
||||||
.joins(:commentaires)
|
.joins(:commentaires)
|
||||||
.where('commentaires.updated_at > follows.messagerie_seen_at')
|
.where('commentaires.updated_at > follows.messagerie_seen_at')
|
||||||
.where.not(commentaires: { email: 'contact@tps.apientreprise.fr' })
|
.where.not(commentaires: { email: OLD_CONTACT_EMAIL })
|
||||||
.where.not(commentaires: { email: 'contact@demarches-simplifiees.fr' })
|
.where.not(commentaires: { email: CONTACT_EMAIL })
|
||||||
|
|
||||||
[
|
[
|
||||||
updated_demandes,
|
updated_demandes,
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
%h2.new-h2 Signaler un dysfonctionnement
|
%h2.new-h2 Signaler un dysfonctionnement
|
||||||
%p.new-p
|
%p.new-p
|
||||||
Si, malgré notre vigilance, vous rencontriez le moindre problème d’accessibilité sur notre site, n’hésitez pas à nous écrire à <a href="mailto:contact@demarches-simplifiees.fr">contact@demarches-simplifiees.fr</a>.
|
= "Si, malgré notre vigilance, vous rencontriez le moindre problème d’accessibilité sur notre site, n’hésitez pas à nous écrire à <a href='mailto:#{CONTACT_EMAIL}'>#{CONTACT_EMAIL}</a>."
|
||||||
|
|
||||||
%h2.new-h2 Défenseur des droits
|
%h2.new-h2 Défenseur des droits
|
||||||
%p.new-p
|
%p.new-p
|
||||||
|
|
|
@ -9,4 +9,4 @@
|
||||||
\-
|
\-
|
||||||
= link_to 'CGU / Mentions légales', CGU_URL
|
= link_to 'CGU / Mentions légales', CGU_URL
|
||||||
\-
|
\-
|
||||||
= link_to 'Contact', "mailto:"+t('dynamics.contact_email')
|
= link_to 'Contact', "mailto:#{CONTACT_EMAIL}"
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
%ul.footer-links
|
%ul.footer-links
|
||||||
%li.footer-link
|
%li.footer-link
|
||||||
= link_to "Contact",
|
= link_to "Contact",
|
||||||
"mailto:#{t('dynamics.contact_email')}",
|
"mailto:#{CONTACT_EMAIL}",
|
||||||
:class => "footer-link"
|
:class => "footer-link"
|
||||||
%li.footer-link
|
%li.footer-link
|
||||||
= link_to "Documentation", DOC_URL, :class => "footer-link", :target => "_blank", rel: "noopener noreferrer"
|
= link_to "Documentation", DOC_URL, :class => "footer-link", :target => "_blank", rel: "noopener noreferrer"
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
%br
|
%br
|
||||||
– par téléphone : 01 76 42 02 87
|
– par téléphone : 01 76 42 02 87
|
||||||
%br
|
%br
|
||||||
– par email : <a href="mailto:contact@demarches-simplifiees.fr">contact@demarches-simplifiees.fr</a>
|
= "– par email : <a href='mailto:#{CONTACT_EMAIL}'>#{CONTACT_EMAIL}</a>"
|
||||||
|
|
||||||
- if nav_bar_profile == :user
|
- if nav_bar_profile == :user
|
||||||
%ul.header-tabs
|
%ul.header-tabs
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
%h2
|
%h2
|
||||||
%span.mail
|
%span.mail
|
||||||
= render partial: 'new_gestionnaire/shared/messages/message_issuer', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
|
= render partial: 'new_gestionnaire/shared/messages/message_issuer', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
|
||||||
- if ![current_gestionnaire.email, commentaire.dossier.user.email, 'contact@tps.apientreprise.fr', 'contact@demarches-simplifiees.fr'].include?(commentaire.email)
|
- if ![current_gestionnaire.email, commentaire.dossier.user.email, OLD_CONTACT_EMAIL, CONTACT_EMAIL].include?(commentaire.email)
|
||||||
%span.guest Invité
|
%span.guest Invité
|
||||||
%span.date{ class: highlight_if_unseen_class(messagerie_seen_at, commentaire.created_at) }
|
%span.date{ class: highlight_if_unseen_class(messagerie_seen_at, commentaire.created_at) }
|
||||||
= I18n.l(commentaire.created_at.localtime, format: '%d/%m/%Y à %H:%M ')
|
= I18n.l(commentaire.created_at.localtime, format: '%d/%m/%Y à %H:%M ')
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
- case commentaire.email
|
- case commentaire.email
|
||||||
- when current_gestionnaire.email
|
- when current_gestionnaire.email
|
||||||
= image_tag('icons/account-circle.svg', class: 'person-icon')
|
= image_tag('icons/account-circle.svg', class: 'person-icon')
|
||||||
- when 'contact@demarches-simplifiees.fr'
|
- when OLD_CONTACT_EMAIL
|
||||||
|
- when CONTACT_EMAIL
|
||||||
= image_tag('icons/mail.svg', class: 'person-icon')
|
= image_tag('icons/mail.svg', class: 'person-icon')
|
||||||
- else
|
- else
|
||||||
= image_tag('icons/blue-person.svg', class: 'person-icon')
|
= image_tag('icons/blue-person.svg', class: 'person-icon')
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
- case commentaire.email
|
- case commentaire.email
|
||||||
- when current_gestionnaire.email
|
- when current_gestionnaire.email
|
||||||
Vous
|
Vous
|
||||||
- when 'contact@tps.apientreprise.fr'
|
- when OLD_CONTACT_EMAIL
|
||||||
- when 'contact@demarches-simplifiees.fr'
|
- when CONTACT_EMAIL
|
||||||
Email automatique
|
Email automatique
|
||||||
- else
|
- else
|
||||||
= commentaire.email
|
= commentaire.email
|
||||||
|
|
|
@ -204,7 +204,7 @@
|
||||||
%p.cta-panel-explanation Notre équipe est disponible pour vous renseigner et vous aider
|
%p.cta-panel-explanation Notre équipe est disponible pour vous renseigner et vous aider
|
||||||
%div
|
%div
|
||||||
= link_to "Contactez-nous",
|
= 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",
|
class: "cta-panel-button-white",
|
||||||
target: "_blank",
|
target: "_blank",
|
||||||
rel: "noopener noreferrer"
|
rel: "noopener noreferrer"
|
||||||
|
|
|
@ -190,7 +190,7 @@
|
||||||
.icon.bubble.avis-icon
|
.icon.bubble.avis-icon
|
||||||
.width-100
|
.width-100
|
||||||
%h2.gestionnaire
|
%h2.gestionnaire
|
||||||
contact@demarches-simplifiees.fr
|
= CONTACT_EMAIL
|
||||||
%span.date Réponse donnée le 13/01/2012
|
%span.date Réponse donnée le 13/01/2012
|
||||||
%p Je donne un avis favorable
|
%p Je donne un avis favorable
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
require_relative "emails"
|
||||||
|
|
||||||
# Use this hook to configure devise mailer, warden hooks and so forth.
|
# Use this hook to configure devise mailer, warden hooks and so forth.
|
||||||
# Many of these configuration options can be set straight in your model.
|
# Many of these configuration options can be set straight in your model.
|
||||||
Devise.setup do |config|
|
Devise.setup do |config|
|
||||||
|
@ -10,7 +12,7 @@ Devise.setup do |config|
|
||||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
# 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
|
# note that it will be overwritten if you use your own mailer class
|
||||||
# with default "from" parameter.
|
# 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.
|
# Configure the class responsible to send e-mails.
|
||||||
config.mailer = 'DeviseUserMailer'
|
config.mailer = 'DeviseUserMailer'
|
||||||
|
|
7
config/initializers/emails.rb
Normal file
7
config/initializers/emails.rb
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
if !defined?(CONTACT_EMAIL)
|
||||||
|
CONTACT_EMAIL = "contact@demarches-simplifiees.fr"
|
||||||
|
EQUIPE_EMAIL = "equipe@demarches-simplifiees.fr"
|
||||||
|
TECH_EMAIL = "tech@demarches-simplifiees.fr"
|
||||||
|
|
||||||
|
OLD_CONTACT_EMAIL = "contact@tps.apientreprise.fr"
|
||||||
|
end
|
|
@ -1,7 +1,6 @@
|
||||||
fr:
|
fr:
|
||||||
dynamics:
|
dynamics:
|
||||||
page_title: demarches-simplifiees.fr
|
page_title: demarches-simplifiees.fr
|
||||||
contact_email: contact@demarches-simplifiees.fr
|
|
||||||
users:
|
users:
|
||||||
connexion_title: Connexion
|
connexion_title: Connexion
|
||||||
mes_dossiers: 'Mes dossiers'
|
mes_dossiers: 'Mes dossiers'
|
||||||
|
|
|
@ -35,7 +35,7 @@ module Mailers
|
||||||
#{detail_procedures(procedures)}
|
#{detail_procedures(procedures)}
|
||||||
|
|
||||||
Pour toute question vous pouvez nous joindre par téléphone au 01 76 42 02 87
|
Pour toute question vous pouvez nous joindre par téléphone au 01 76 42 02 87
|
||||||
ou sur l’adresse email contact@demarches-simplifiees.fr.
|
ou sur l’adresse email #{CONTACT_EMAIL}.
|
||||||
-- \nL’équipe demarches-simplifiees.fr
|
-- \nL’équipe demarches-simplifiees.fr
|
||||||
HEREDOC
|
HEREDOC
|
||||||
end
|
end
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace :'2018_05_30_missed_ar_messages' do
|
||||||
|
|
||||||
Commentaire.create(
|
Commentaire.create(
|
||||||
dossier: dossier,
|
dossier: dossier,
|
||||||
email: I18n.t("dynamics.contact_email"),
|
email: CONTACT_EMAIL,
|
||||||
body: "[#{subject}]<br><br>#{body}",
|
body: "[#{subject}]<br><br>#{body}",
|
||||||
created_at: date
|
created_at: date
|
||||||
)
|
)
|
||||||
|
|
|
@ -31,7 +31,7 @@ describe Commentaire do
|
||||||
expect(commentaire).not_to receive(:notify_user)
|
expect(commentaire).not_to receive(:notify_user)
|
||||||
expect(commentaire).not_to receive(:notify_gestionnaires)
|
expect(commentaire).not_to receive(:notify_gestionnaires)
|
||||||
|
|
||||||
commentaire.email = "contact@demarches-simplifiees.fr"
|
commentaire.email = CONTACT_EMAIL
|
||||||
commentaire.save
|
commentaire.save
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -246,7 +246,7 @@ describe Gestionnaire, type: :model do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when there is a new commentaire issued by tps' do
|
context 'when there is a new commentaire issued by tps' do
|
||||||
before { create(:commentaire, dossier: dossier, email: 'contact@demarches-simplifiees.fr') }
|
before { create(:commentaire, dossier: dossier, email: CONTACT_EMAIL) }
|
||||||
|
|
||||||
it { is_expected.to match({ demande: false, annotations_privees: false, avis: false, messagerie: false }) }
|
it { is_expected.to match({ demande: false, annotations_privees: false, avis: false, messagerie: false }) }
|
||||||
end
|
end
|
||||||
|
@ -327,7 +327,7 @@ describe Gestionnaire, type: :model do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when there is a new commentaire issued by tps' do
|
context 'when there is a new commentaire issued by tps' do
|
||||||
before { create(:commentaire, dossier: dossier, email: 'contact@demarches-simplifiees.fr') }
|
before { create(:commentaire, dossier: dossier, email: CONTACT_EMAIL) }
|
||||||
|
|
||||||
it { is_expected.to match([]) }
|
it { is_expected.to match([]) }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue