diff --git a/src/Controller/SignUpController.php b/src/Controller/SignUpController.php index 573f8bf658eba85030af06de4e4aef0bac7a5ba0..b116111fc0cbd40a618f3f1d073ecb9357e6aea6 100644 --- a/src/Controller/SignUpController.php +++ b/src/Controller/SignUpController.php @@ -21,7 +21,8 @@ class SignUpController extends AbstractController if ($form->isSubmitted() && $form->isValid()) { $user = $form->getData(); - return $this->redirectToRoute('sign_up_success'); + $this->addFlash('succes', 'Vous pouvez maintenant vous connecter à votre compte.'); + return $this->redirectToRoute('login'); } return $this->renderForm('sign_up/index.html.twig', [ diff --git a/templates/calendar/index.html.twig b/templates/calendar/index.html.twig index ae51bae80be1337aa26a17284f368802adbe6e83..183669ea3387fb2173153dacaccde1f56fa98c3c 100644 --- a/templates/calendar/index.html.twig +++ b/templates/calendar/index.html.twig @@ -21,10 +21,11 @@ </div> </div> - {# <div id="calendar" style"height: 800px;"></div> #} + <div class="badge badge-primary text-wrap" style="width: 40rem;color : black;"> <button id="prevBtn" class="btn btn-secondary">Prev</button> <button id="nextBtn" class="btn btn-primary">Next</button> - <h3><span id="dateStart"></span> jusqu'au <span id="dateEnd"></span></h3> + <h4 class="text-center"><span id="dateStart"></span> jusqu'au <span id="dateEnd"></span></h4> + </div> <div id="calendarList"></div> </body> diff --git a/templates/login/index.html.twig b/templates/login/index.html.twig index 33b747fef3d8b0032a36e3f79408ec947a777876..a1cb0022b6a957a471d7c5209209a518c0c102f4 100644 --- a/templates/login/index.html.twig +++ b/templates/login/index.html.twig @@ -2,20 +2,28 @@ {% block body %} - {% if error %} - <div>{{ error.messageKey|trans(error.messageData, 'security') }}</div> - {% endif %} + {% if error %} + <div>{{ error.messageKey|trans(error.messageData, 'security') }}</div> + {% endif %} - <form action="{{ path('login') }}" method="post"> - <label for="username">Email:</label> - <input type="text" id="username" name="_username" value="{{ last_username }}"/> + {% for message in app.flashes('success') %} + <div class="alert alert-success"> + {{ message }} + </div> + {% endfor %} - <label for="password">Password:</label> - <input type="password" id="password" name="_password"/> - {# If you want to control the URL the user is redirected to on success - <input type="hidden" name="_target_path" value="/account"/> #} + <form action="{{ path('login') }}" method="post"> + <label for="username">Email:</label> + <input type="text" id="username" name="_username" value="{{ last_username }}"/> - <button type="submit">login</button> - </form> + <label for="password">Password:</label> + <input + type="password" id="password" name="_password"/> + + {# If you want to control the URL the user is redirected to on success + <input type="hidden" name="_target_path" value="/account"/> #} + + <button type="submit">login</button> + </form> {% endblock %} diff --git a/templates/sign_up/index.html.twig b/templates/sign_up/index.html.twig index 49736a5208fe0852cc1d5d67e4505b71039eaf59..1ab255d6f454dae90abdbed51f8035c6e274be39 100644 --- a/templates/sign_up/index.html.twig +++ b/templates/sign_up/index.html.twig @@ -4,6 +4,8 @@ {% block body %} + + <div class="container"> {{ form(form) }} </div>