From 81223e51feb86e3d755cd4f7c0dc2285d3a903d8 Mon Sep 17 00:00:00 2001 From: Camille Simiand <camille.simiand@tetras-libre.fr> Date: Mon, 13 Dec 2021 10:49:31 +0100 Subject: [PATCH] Improve CSS --- templates/reset_password/request.html.twig | 32 ++++++++++++++-------- templates/reset_password/reset.html.twig | 17 ++++++++---- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/templates/reset_password/request.html.twig b/templates/reset_password/request.html.twig index 4afe4b8..24b3509 100644 --- a/templates/reset_password/request.html.twig +++ b/templates/reset_password/request.html.twig @@ -8,15 +8,23 @@ {% endfor %} <h1 class="m-auto mb-4 mt-4 col-6">Reset your password</h1> - {{ form_start(requestForm, {'attr': {'class': 'd-flex flex-column justify-content-center'}}) }} - {{ form_row(requestForm.email, {'row_attr': {'class' : 'm-auto mb-2 mt-4 col-6'}}) }} - <div class="m-auto mb-4 mt-4 col-6"> - <small> - Enter your email address and we will send you a - link to reset your password. - </small> - </div> - - <button class="btn btn-primary m-auto mb-4 mt-4 col-2" type="submit">Reset password</button> - {{ form_end(requestForm) }} -{% endblock %} + <div class="d-flex flex-column justify-content-center"> + + {{ form_start(requestForm, {'attr': {novalidate: 'novalidate'}}) }} + <div class="m-auto mb-2 mt-4 col-6"> + {{ form_row(requestForm.email) }} + </div> + + <div class="m-auto mb-4 mt-4 col-6"> + <small> + Enter your email address and we will send you a + link to reset your password. + </small> + </div> + + <button class="d-flex flex-column btn btn-primary m-auto mt-2 mb-4 col-2" type="submit">Reset password</button> + + {{ form_end(requestForm) }} + </div> + + {% endblock %} diff --git a/templates/reset_password/reset.html.twig b/templates/reset_password/reset.html.twig index 615ad63..b97a360 100644 --- a/templates/reset_password/reset.html.twig +++ b/templates/reset_password/reset.html.twig @@ -3,10 +3,17 @@ {% block title %}Reset your password{% endblock %} {% block body %} - <h1>Reset your password</h1> + <h1 class="m-auto mb-4 col-6">Reset your password</h1> + + <div class="d-flex flex-column justify-content-center"> + {{ form_start(resetForm, {'attr': {novalidate: 'novalidate'}}) }} + <div class="m-auto mb-4 col-6"> + {{ form_row(resetForm.plainPassword) }} + </div> + <button class="d-flex flex-column btn btn-primary m-auto mt-2 mb-4 col-2" type="submit"> + Reset password + </button> + {{ form_end(resetForm) }} + </div> - {{ form_start(resetForm) }} - {{ form_row(resetForm.plainPassword) }} - <button class="btn btn-primary">Reset password</button> - {{ form_end(resetForm) }} {% endblock %} -- GitLab