2018-01-03 17:11:47 +01:00
|
|
|
class AdministrationMailer < ApplicationMailer
|
2018-01-05 11:16:50 +01:00
|
|
|
layout 'mailers/layout'
|
|
|
|
|
2018-03-20 17:47:37 +01:00
|
|
|
def new_admin_email(admin, administration)
|
2016-02-23 16:51:24 +01:00
|
|
|
@admin = admin
|
2017-12-21 15:04:03 +01:00
|
|
|
@administration = administration
|
2018-05-31 15:50:13 +02:00
|
|
|
subject = "Création d'un compte admininistrateur"
|
2016-02-23 16:51:24 +01:00
|
|
|
|
2018-05-31 15:43:57 +02:00
|
|
|
mail(to: TECH_EMAIL,
|
2018-05-31 15:26:02 +02:00
|
|
|
subject: subject)
|
2016-02-23 16:51:24 +01:00
|
|
|
end
|
2018-01-05 11:16:50 +01:00
|
|
|
|
2018-05-31 18:07:19 +02:00
|
|
|
def invite_admin(admin, reset_password_token, administration_id)
|
2018-01-11 14:17:37 +01:00
|
|
|
@reset_password_token = reset_password_token
|
2018-03-23 18:06:17 +01:00
|
|
|
@admin = admin
|
2018-05-31 18:07:19 +02:00
|
|
|
@author_name = BizDev.full_name(administration_id)
|
2018-05-31 15:48:36 +02:00
|
|
|
subject = "Activez votre compte administrateur"
|
2018-05-31 23:58:10 +02:00
|
|
|
|
2018-01-11 14:17:37 +01:00
|
|
|
mail(to: admin.email,
|
2018-05-31 15:26:02 +02:00
|
|
|
subject: subject,
|
2018-05-31 15:43:57 +02:00
|
|
|
reply_to: CONTACT_EMAIL)
|
2018-01-11 14:17:37 +01:00
|
|
|
end
|
|
|
|
|
2018-03-27 13:52:34 +02:00
|
|
|
def refuse_admin(admin_email)
|
2018-05-31 15:48:36 +02:00
|
|
|
subject = "Votre demande de compte a été refusée"
|
2018-05-31 15:26:02 +02:00
|
|
|
|
2018-03-27 13:52:34 +02:00
|
|
|
mail(to: admin_email,
|
2018-05-31 15:26:02 +02:00
|
|
|
subject: subject,
|
2018-05-31 15:43:57 +02:00
|
|
|
reply_to: CONTACT_EMAIL)
|
2018-03-27 13:52:34 +02:00
|
|
|
end
|
|
|
|
|
2018-01-05 11:16:50 +01:00
|
|
|
def dubious_procedures(procedures_and_type_de_champs)
|
|
|
|
@procedures_and_type_de_champs = procedures_and_type_de_champs
|
2018-05-31 15:26:02 +02:00
|
|
|
subject = "[RGS] De nouvelles procédures comportent des champs interdits"
|
2018-05-31 23:58:10 +02:00
|
|
|
|
2018-05-31 15:43:57 +02:00
|
|
|
mail(to: EQUIPE_EMAIL,
|
2018-05-31 15:26:02 +02:00
|
|
|
subject: subject)
|
2018-01-05 11:16:50 +01:00
|
|
|
end
|
2016-02-23 16:51:24 +01:00
|
|
|
end
|