Adapted confirmation text for FE candidates
This commit is contained in:
parent
caa1395a68
commit
e8b0f3cf78
4 changed files with 14 additions and 8 deletions
|
|
@ -112,7 +112,7 @@ class CandidateAdmin(admin.ModelAdmin):
|
|||
|
||||
def candidate_actions(self, obj):
|
||||
return format_html(
|
||||
'<a class="button" href="{}">Confirmation de réception</a> '
|
||||
'<a class="button" href="{}">Confirmation de réception FE + EDE</a> '
|
||||
'<a class="button" href="{}">Validation enseignants EDE</a> '
|
||||
'<a class="button" href="{}">Convocation aux examens EDE</a> '
|
||||
'<a class="button" href="{}">Impression du résumé du dossier EDE</a>',
|
||||
|
|
|
|||
|
|
@ -164,7 +164,9 @@ tél. 032 886 33 00"""
|
|||
self.assertEqual(mail.outbox[0].recipients(), ['joe@example.org', 'me@example.org'])
|
||||
self.assertEqual(mail.outbox[0].body, """Madame, Monsieur,
|
||||
|
||||
Nous vous confirmons la bonne réception de l’inscription de Madame Joé Glatz dans la filière Assist. socio-éducatif-ve CFC pour l’année scolaire à venir.
|
||||
Nous vous confirmons la bonne réception de l’inscription de Madame Joé Glatz dans la filière Assist. socio-éducatif-ve CFC pour la prochaine rentrée scolaire.
|
||||
|
||||
Le nom de la classe ainsi que les jours de cours vous seront communiqués dès que toutes les inscriptions seront rentrées, mais au plus tard durant la 1ère semaine de juillet.
|
||||
|
||||
Nous nous tenons à votre disposition pour tout renseignement complémentaire et vous prions de recevoir, Madame, Monsieur, nos salutations les plus cordiales.
|
||||
|
||||
|
|
|
|||
|
|
@ -57,13 +57,15 @@ class ConfirmationView(EmailConfirmationBaseView):
|
|||
|
||||
def get(self, request, *args, **kwargs):
|
||||
candidate = Candidate.objects.get(pk=self.kwargs['pk'])
|
||||
if candidate.confirmation_date:
|
||||
if candidate.section != 'EDE' and not candidate.section.is_fe():
|
||||
messages.error(request, "Ce formulaire n'est disponible que pour les candidats EDE ou FE")
|
||||
elif candidate.confirmation_date:
|
||||
messages.error(request, 'Une confirmation a déjà été envoyée!')
|
||||
return redirect(reverse("admin:candidats_candidate_change", args=(candidate.pk,)))
|
||||
elif candidate.canceled_file:
|
||||
messages.error(request, 'Ce dossier a été annulé!')
|
||||
return redirect(reverse("admin:candidats_candidate_change", args=(candidate.pk,)))
|
||||
return super().get(request, *args, **kwargs)
|
||||
else:
|
||||
return super().get(request, *args, **kwargs)
|
||||
return redirect(reverse("admin:candidats_candidate_change", args=(candidate.pk,)))
|
||||
|
||||
def get_initial(self):
|
||||
initial = super().get_initial()
|
||||
|
|
@ -72,7 +74,7 @@ class ConfirmationView(EmailConfirmationBaseView):
|
|||
to = [candidate.email]
|
||||
if candidate.section == 'EDE':
|
||||
src_email = 'email/candidate_confirm_EDE.txt'
|
||||
else:
|
||||
elif candidate.section.is_fe():
|
||||
src_email = 'email/candidate_confirm_FE.txt'
|
||||
if candidate.corporation and candidate.corporation.email:
|
||||
to.append(candidate.corporation.email)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue