From e1cefff40dcf408133b99b4183d77f76ea2b0008 Mon Sep 17 00:00:00 2001 From: samuel Date: Wed, 15 Nov 2023 15:24:09 +0100 Subject: [PATCH] work login in progress --- public/index.php | 1 + src/Controller/AuthController.php | 5 +- src/Views/display_login.html.twig | 86 +++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 src/Views/display_login.html.twig diff --git a/public/index.php b/public/index.php index bce242c..8f9a00c 100644 --- a/public/index.php +++ b/public/index.php @@ -38,6 +38,7 @@ $router->map("GET", "/twig", fn() => $sampleFormController->displayFormTwig()); $router->map("POST", "/submit-twig", fn() => $sampleFormController->submitFormTwig($_POST)); $router->map("GET", "/register", fn() => $authController->displayRegister()); $router->map("POST", "/register", fn() => $authController->confirmRegister($_POST)); +$router->map("GET", "/login", fn() => $authController->displayLogin()); $router->map("GET", "/tactic/new", fn() => $editorController->makeNew()); $router->map("GET", "/tactic/[i:id]/edit", fn(int $id) => $editorController->openEditorFor($id)); diff --git a/src/Controller/AuthController.php b/src/Controller/AuthController.php index 48217eb..9589af1 100644 --- a/src/Controller/AuthController.php +++ b/src/Controller/AuthController.php @@ -61,6 +61,9 @@ class AuthController { } return ViewHttpResponse::twig("display_register.html.twig", ['bad_fields' => $bad_fields]); } -//GARDER LES EMAIL ET USERNAME ET REGLER SURLIGNAGE DES MDP QUAND CA VA PAS + + public function displayLogin():HttpResponse{ + return ViewHttpResponse::twig("display_login.html.twig", []); + } } \ No newline at end of file diff --git a/src/Views/display_login.html.twig b/src/Views/display_login.html.twig new file mode 100644 index 0000000..48d4bfd --- /dev/null +++ b/src/Views/display_login.html.twig @@ -0,0 +1,86 @@ + + + + + Connexion + + + + + +
+

Se connecter

+
+
+ + + + + + +
+
+ +
+
+
+ + + + \ No newline at end of file