From ab51562177ab5947019a92cea0fba12f977aa317 Mon Sep 17 00:00:00 2001 From: jleroy2023 Date: Mon, 25 Nov 2024 11:36:12 +0100 Subject: [PATCH] admin responsive V1 --- .env | 2 +- src/Controller/AdminController.php | 2 ++ templates/admin/index.html.twig | 5 ++--- templates/admin/sidebar.html.twig | 4 ++-- templates/main/footer.html.twig | 20 +++++--------------- 5 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.env b/.env index cc08693..3c7998c 100644 --- a/.env +++ b/.env @@ -37,5 +37,5 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 ###< symfony/messenger ### ###> symfony/mailer ### -MAILER_DSN=smtp:// +MAILER_DSN=smtp://dev-test@lidge.fr:N2uGKkGa8tQBp5NIvHIt@mail.lidge.fr:587 ###< symfony/mailer ### diff --git a/src/Controller/AdminController.php b/src/Controller/AdminController.php index 77c56dd..8f52699 100644 --- a/src/Controller/AdminController.php +++ b/src/Controller/AdminController.php @@ -138,6 +138,7 @@ class AdminController extends AbstractController $participant->setActif(false); $participant->setRoles(['ROLE_USER']); $participant->setPassword(password_hash("aChanger44!", PASSWORD_BCRYPT)); + $participant->setPending(true); $entityManager->persist($participant); @@ -203,6 +204,7 @@ class AdminController extends AbstractController $participant->setActif(false); $participant->setRoles(explode('|', $row[7])); $participant->setPassword(password_hash("aChanger44!", PASSWORD_BCRYPT)); + $participant->setPending(true); $em->persist($participant); // Générer un token unique diff --git a/templates/admin/index.html.twig b/templates/admin/index.html.twig index d912f7d..ef0e495 100644 --- a/templates/admin/index.html.twig +++ b/templates/admin/index.html.twig @@ -3,11 +3,10 @@ {% block title %}📣 Sortie.com Admin 🔊{% endblock %} {% block content %} -
- +
{% include 'admin/sidebar.html.twig' %} -
+

Bienvenue sur le Panel d'Administration

Utilisez le menu pour accéder aux différentes sections.

diff --git a/templates/admin/sidebar.html.twig b/templates/admin/sidebar.html.twig index 4f8ae2b..099f60e 100644 --- a/templates/admin/sidebar.html.twig +++ b/templates/admin/sidebar.html.twig @@ -1,4 +1,4 @@ - diff --git a/templates/main/footer.html.twig b/templates/main/footer.html.twig index 28be863..19480b9 100644 --- a/templates/main/footer.html.twig +++ b/templates/main/footer.html.twig @@ -1,15 +1,5 @@ - - - - - {% block stylesheets %} - {{ encore_entry_link_tags('app') }} - {% endblock %} - - - -
- ENI © Sortie {{ "now"|date("Y") }} -
- - \ No newline at end of file + \ No newline at end of file