From f7cb4f155a14b8bc7a597a0dc448542ce0ef1108 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Fri, 6 Feb 2026 08:47:15 +0100 Subject: [PATCH] Ajustement pied de page confirmation MSP --- candidats/tests.py | 2 +- candidats/views.py | 12 ++++++++---- templates/email/candidate_confirm_EDE.txt | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/candidats/tests.py b/candidats/tests.py index 9267f95..b241b34 100644 --- a/candidats/tests.py +++ b/candidats/tests.py @@ -151,7 +151,7 @@ Votre dossier sera traité dans les jours à venir et des nouvelles vous seront Dans l’intervalle, nous vous adressons, Monsieur, nos salutations les plus cordiales. -Secrétariat de la filière Education de l’enfance, dipl. ES +Secrétariat de la filière Éducation de l’enfance, dipl. ES Hans Schmid me@example.org tél. 032 886 33 00""" diff --git a/candidats/views.py b/candidats/views.py index bf85722..7d3c361 100644 --- a/candidats/views.py +++ b/candidats/views.py @@ -51,8 +51,16 @@ class ConfirmationView(CandidateConfirmationView): candidate = Candidate.objects.get(pk=self.kwargs['pk']) to = [candidate.email] + msg_context = { + "candidate": candidate, + "sender": self.request.user, + } if candidate.section in {'EDE', 'MSP'}: src_email = 'email/candidate_confirm_EDE.txt' + if candidate.section == "EDE": + msg_context["nom_filiere"] = "Éducation de l’enfance, dipl. ES" + else: + msg_context["nom_filiere"] = "Maîtrise socioprofessionnelle" elif candidate.section == 'EDS': src_email = 'email/candidate_confirm_EDS.txt' elif candidate.section in {'ASA', 'ASE', 'ASSC'}: @@ -62,10 +70,6 @@ class ConfirmationView(CandidateConfirmationView): if candidate.instructor and candidate.instructor.email: to.append(candidate.instructor.email) - msg_context = { - 'candidate': candidate, - 'sender': self.request.user, - } initial.update({ 'cci': self.request.user.email, 'to': '; '.join(to), diff --git a/templates/email/candidate_confirm_EDE.txt b/templates/email/candidate_confirm_EDE.txt index b9c38bf..4480940 100644 --- a/templates/email/candidate_confirm_EDE.txt +++ b/templates/email/candidate_confirm_EDE.txt @@ -7,7 +7,7 @@ Votre dossier sera traité dans les jours à venir et des nouvelles vous seront Dans l’intervalle, nous vous adressons, {{ candidate.civility }}, nos salutations les plus cordiales. -Secrétariat de la filière Education de l’enfance, dipl. ES +Secrétariat de la filière {{ nom_filiere }} {{ sender.first_name }} {{ sender.last_name }} {{ sender.email }} tél. 032 886 33 00