feat(join): Ajoute page de confirmation de candidature et emails.

Ajoute une page de confirmation après soumission du formulaire et
envoie des emails de confirmation au candidat et à l'équipe.
This commit is contained in:
Serreau Jovann
2025-12-25 14:41:13 +01:00
parent 51d9d87784
commit 8846b80aa7
9 changed files with 242 additions and 4 deletions

View File

@@ -30,6 +30,13 @@ use Twig\Environment;
class JoinController extends AbstractController class JoinController extends AbstractController
{ {
#[Route(path: '/join/confirmed', name: 'app_recruit_confirmed', options: ['sitemap' => false], methods: ['GET','POST'])]
public function joinConfirmed(Request $request,EntityManagerInterface $entityManager,Mailer $mailer,KernelInterface $kernel): Response
{
return $this->render('join/confirmed.twig', [
'no_index' => true
]);
}
#[Route(path: '/join', name: 'app_recruit', options: ['sitemap' => false], methods: ['GET','POST'])] #[Route(path: '/join', name: 'app_recruit', options: ['sitemap' => false], methods: ['GET','POST'])]
public function join(Request $request,EntityManagerInterface $entityManager,Mailer $mailer,KernelInterface $kernel): Response public function join(Request $request,EntityManagerInterface $entityManager,Mailer $mailer,KernelInterface $kernel): Response
@@ -66,13 +73,11 @@ class JoinController extends AbstractController
$mailer->send($j->getEmail(), $mailer->send($j->getEmail(),
$j->getSurname()." ".$j->getName(), $j->getSurname()." ".$j->getName(),
"[E-Cosplay] - Confirmation de votre candidature", "[E-Cosplay] - Confirmation de votre candidature",
'condidat/confirm.twig', 'candidat/confirm.twig',
['joint'=>$j], ['joint'=>$j],
[new DataPart($content,'candidat.pdf','application/pdf')] [new DataPart($content,'candidat.pdf','application/pdf')]
); );
//send mail to contact@e-cosplay.fr return $this->redirectToRoute('app_recruit_comfirmed');
//send mail to candidat
} }
return $this->render('join.twig',[ return $this->render('join.twig',[
'form' => $form->createView(), 'form' => $form->createView(),

View File

@@ -0,0 +1,44 @@
{% extends 'base.twig' %}
{% block title %}{{'confirmation.title'|trans}}{% endblock %}
{% block canonical_url %}<link rel="canonical" href="{{ url('app_recruit_confirmed') }}" />{% endblock %}
{% block body %}
<div class="bg-white min-h-screen flex items-center justify-center py-20">
<div class="container mx-auto px-6 max-w-3xl">
{# --- CARTE DE CONFIRMATION STYLE COMICS --- #}
<div class="bg-white border-8 border-black p-10 md:p-16 shadow-[30px_30px_0px_0px_rgba(255,193,7,1)] text-center transform -rotate-1">
{# Icône de succès #}
<div class="text-7xl mb-6 transform rotate-3 inline-block">🚀</div>
<h1 class="text-4xl md:text-6xl font-black uppercase italic mb-6 tracking-tighter leading-none">
{{ 'confirmation.header'|trans }}
</h1>
<div class="w-24 h-2 bg-[#E63946] mx-auto mb-8"></div>
<p class="text-xl md:text-2xl font-bold text-gray-800 mb-10 leading-relaxed">
{{ 'confirmation.message'|trans }}
</p>
{# Bloc Délai #}
<div class="bg-[#1A1A1A] text-white p-6 border-4 border-black mb-10">
<p class="text-sm uppercase tracking-widest font-black text-[#FFC107] mb-2">
{{ 'confirmation.delay.label'|trans }}
</p>
<p class="text-2xl font-black uppercase italic">
{{ 'confirmation.delay.value'|trans }}
</p>
</div>
{# Bouton retour #}
<a href="{{ path('app_home') }}" class="inline-block px-10 py-4 bg-white border-4 border-black font-black uppercase hover:bg-black hover:text-white transition-all shadow-[5px_5px_0px_0px_rgba(0,0,0,1)]">
{{ 'confirmation.back_home'|trans }}
</a>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,40 @@
{% extends 'mails/base.twig' %}
{% block subject %}
Confirmation de réception - Ta candidature chez E-Cosplay
{% endblock %}
{% block content %}
<mj-section background-color="#ffffff" padding-top="20px">
<mj-column width="100%">
<mj-text font-size="20px" color="#2c3e50" font-weight="bold" align="center">
Merci {{ join.name }} !
</mj-text>
<mj-text font-size="16px" color="#444444" line-height="24px" align="center">
Nous avons bien reçu ta candidature pour rejoindre l'association <strong>E-Cosplay</strong>.
</mj-text>
<mj-divider border-color="#2c3e50" border-width="2px" width="50px"></mj-divider>
</mj-column>
</mj-section>
<mj-section background-color="#ffffff" padding-top="0px">
<mj-column width="100%">
<mj-text font-size="15px" color="#555555" line-height="22px">
Ton dossier est désormais entre les mains de notre équipe. Nous l'examinons avec attention et nous reviendrons vers toi <strong>sous peu</strong> par email ou via Discord pour la suite des événements.
</mj-text>
<mj-text font-size="15px" color="#555555" line-height="22px">
En attendant, n'hésite pas à nous suivre sur nos réseaux sociaux pour découvrir nos dernières activités !
</mj-text>
</mj-column>
</mj-section>
<mj-section padding-top="10px">
<mj-column width="100%">
<mj-text font-size="11px" color="#999999" align="center">
E-Cosplay Association loi 1901<br>
42 rue de saint-quentin, 02800 Beautor<br>
Ceci est un message automatique, merci de ne pas y répondre directement.
</mj-text>
</mj-column>
</mj-section>
{% endblock %}

View File

@@ -0,0 +1,58 @@
{% extends 'mails/base.twig' %}
{% block subject %}
Nouvelle candidature
{% endblock %}
{% block content %}
<mj-section background-color="#ffffff" padding-top="20px">
<mj-column width="100%">
<mj-text font-size="24px" color="#333333" font-weight="bold" align="center">
Nouvelle Candidature Reçue !
</mj-text>
<mj-text font-size="16px" color="#555555" line-height="24px">
Bonjour l'équipe, <br><br>
Un nouveau formulaire d'adhésion vient d'être soumis sur le site <strong>E-Cosplay</strong>. Voici les détails du candidat :
</mj-text>
</mj-column>
</mj-section>
<mj-section background-color="#ffffff" padding="0px">
<mj-column width="90%" background-color="#fafafa" border="1px solid #e0e0e0" padding="15px">
<mj-text font-size="15px" color="#333333" padding-bottom="5px">
<strong>Candidat :</strong> {{ join.surname|upper }} {{ join.name }}
</mj-text>
<mj-text font-size="15px" color="#333333" padding-bottom="5px">
<strong>Email :</strong> {{ join.email }}
</mj-text>
<mj-text font-size="15px" color="#333333" padding-bottom="5px">
<strong>Rôles :</strong>
{% if join.role is iterable %}
{{ join.role|join(', ') }}
{% else %}
{{ join.role }}
{% endif %}
</mj-text>
<mj-text font-size="15px" color="#333333">
<strong>Date :</strong> {{ join.createAt|date('d/m/Y H:i') }}
</mj-text>
</mj-column>
</mj-section>
<mj-section background-color="#ffffff" padding-top="30px">
<mj-column width="100%">
<mj-text font-size="12px" color="#888888" align="center" padding-top="20px">
Vous pouvez également retrouver le PDF généré en pièce jointe de ce mail.
</mj-text>
</mj-column>
</mj-section>
<mj-section padding-top="20px">
<mj-column width="100%">
<mj-text font-size="12px" color="#aaaaaa" align="center">
© {{ "now"|date("Y") }} E-Cosplay Association - 42 rue de saint-quentin 02800 Beautor
</mj-text>
</mj-column>
</mj-section>
{% endblock %}

View File

@@ -0,0 +1,26 @@
{% extends 'mails/base.twig' %}
{% block subject %}
Confirmation de réception - Ta candidature chez E-Cosplay
{% endblock %}
{% block content %}
BONJOUR {{ join.name|upper }},
C'est confirmé ! Nous avons bien reçu ta candidature pour rejoindre l'association E-Cosplay.
Toute l'équipe te remercie de l'intérêt que tu portes à notre communauté. Ton dossier est désormais entre les mains de nos responsables qui l'examineront avec attention.
LA SUITE DES ÉVÉNEMENTS :
-------------------------
Nous reviendrons vers toi sous peu (généralement sous quelques jours) pour te donner une réponse ou convenir d'un petit échange, soit par email, soit directement sur Discord ({{ join.discordAccount|default('via le compte fourni') }}).
À très bientôt,
L'équipe E-Cosplay.
---
E-Cosplay Association loi 1901
42 rue de saint-quentin, 02800 Beautor
Ceci est un message automatique, merci de ne pas y répondre directement.
{% endblock %}

View File

@@ -0,0 +1,37 @@
{% extends 'mails/base.twig' %}
{% block subject %}
Nouvelle candidature : {{ join.name }} {{ join.surname }}
{% endblock %}
{% block content %}
NOUVELLE CANDIDATURE REÇUE
==========================
Bonjour l'équipe,
Une nouvelle candidature a été déposée sur le site E-Cosplay.
DÉTAILS DU CANDIDAT :
---------------------
- Nom complet : {{ join.surname|upper }} {{ join.name }}
- Email : {{ join.email }}
- Téléphone : {{ join.phone }}
- Rôles souhaités : {% if join.role is iterable %}{{ join.role|join(', ') }}{% else %}{{ join.role }}{% endif %}
- Date de dépôt : {{ join.createAt|date('d/m/Y à H:i') }}
PRÉSENTATION :
--------------
{{ join.who|default('Aucune présentation fournie.') }}
COORDONNÉES NUMÉRIQUES :
------------------------
- Discord : {{ join.discordAccount|default('Non renseigné') }}
- Instagram : {{ join.instaLink|default('N/A') }}
Vous pouvez consulter cette fiche directement dans l'administration
---
Ceci est un message automatique envoyé par le site E-Cosplay.
© {{ "now"|date("Y") }} E-Cosplay Association
{% endblock %}

View File

@@ -891,3 +891,12 @@ form:
form_feedback: form_feedback:
success: "您的申请已成功提交!委员会将尽快进行审核。" success: "您的申请已成功提交!委员会将尽快进行审核。"
error: "发生错误,请检查您的信息。" error: "发生错误,请检查您的信息。"
confirmation:
title: "申请已收到! - E-Cosplay"
header: "收到申请!"
message: "您的入会申请已正式提交给委员会。我们将认真审核您的申请。"
delay:
label: "预计回复时间"
value: "7 到 10 个工作日"
back_home: "返回首页"

View File

@@ -960,3 +960,13 @@ form:
form_feedback: form_feedback:
success: "Your application has been successfully submitted! The board will review it shortly." success: "Your application has been successfully submitted! The board will review it shortly."
error: "An error occurred. Please check your information." error: "An error occurred. Please check your information."
confirmation:
title: "Application Received! - E-Cosplay"
header: "Message Received!"
message: "Your membership application is officially in the hands of the board. We will review it carefully."
delay:
label: "Estimated response time"
value: "7 to 10 business days"
back_home: "Back to Home"

View File

@@ -962,3 +962,12 @@ form_feedback:
success: "Votre candidature a été envoyée avec succès ! Le bureau l'étudiera prochainement." success: "Votre candidature a été envoyée avec succès ! Le bureau l'étudiera prochainement."
error: "Une erreur est survenue. Veuillez vérifier vos informations." error: "Une erreur est survenue. Veuillez vérifier vos informations."
join_at: 'messages' join_at: 'messages'
confirmation:
title: "Candidature reçue ! - E-Cosplay"
header: "Bien reçu, Major !"
message: "Ta demande d'adhésion est officiellement entre les mains du bureau. Nous allons l'étudier avec attention."
delay:
label: "Délai de réponse estimé"
value: "7 à 10 jours ouvrés"
back_home: "Retour à l'accueil"