From bde583e14e622f71a8e871f01dbb48d064e5ce3b Mon Sep 17 00:00:00 2001 From: llaniau Date: Wed, 22 Jul 2020 08:34:05 +0200 Subject: [PATCH] Mise en place mentions, cgu et connexion V2 --- .../views/Security/loginModalV2.html.twig | 198 +++++++++++++++ .../defaultv2/accueil/blocLogin.html.twig | 100 +------- .../views/defaultv2/accueil/index.html.twig | 9 +- .../views/defaultv2/footer/cgu.html.twig | 8 +- .../views/defaultv2/footer/mentions.html.twig | 231 ++++++++++++++++++ .../Controller/DefaultController.php | 65 +++++ .../Controller/SecurityModalController.php | 39 +++ .../Controller/RegistrationController.php | 6 +- 8 files changed, 548 insertions(+), 108 deletions(-) create mode 100644 volume/www/website/www/app/Resources/FOSUserBundle/views/Security/loginModalV2.html.twig create mode 100755 volume/www/website/www/app/Resources/views/defaultv2/footer/mentions.html.twig diff --git a/volume/www/website/www/app/Resources/FOSUserBundle/views/Security/loginModalV2.html.twig b/volume/www/website/www/app/Resources/FOSUserBundle/views/Security/loginModalV2.html.twig new file mode 100644 index 000000000..595891e16 --- /dev/null +++ b/volume/www/website/www/app/Resources/FOSUserBundle/views/Security/loginModalV2.html.twig @@ -0,0 +1,198 @@ +
+ {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %} + {{ 'layout.logged_in_as'|trans({'%username%': app.user.username}, 'FOSUserBundle') }} | + + {{ 'layout.logout'|trans({}, 'FOSUserBundle') }} + + {% else %} + {{ 'layout.login'|trans({}, 'FOSUserBundle') }} + {% endif %} +
+ {% for type, messages in app.session.flashBag.all %} + {% for message in messages %} +
+ {{ message|trans({}, 'FOSUserBundle') }} +
+ {% endfor %} + {% endfor %} + {% block fos_user_content %} +
+ {{ form_start(register_form, {'method': 'post', 'action': path('fos_user_registration_register'), 'attr': {'class': 'fos_user_registration_register'}}) + }} + {{ form_errors(register_form) }} + + + + {{ form_rest(register_form) }} + {{ form_end(register_form) }} + +
+ {% endblock fos_user_content %} \ No newline at end of file diff --git a/volume/www/website/www/app/Resources/views/defaultv2/accueil/blocLogin.html.twig b/volume/www/website/www/app/Resources/views/defaultv2/accueil/blocLogin.html.twig index 19f226ed7..fd937bc29 100644 --- a/volume/www/website/www/app/Resources/views/defaultv2/accueil/blocLogin.html.twig +++ b/volume/www/website/www/app/Resources/views/defaultv2/accueil/blocLogin.html.twig @@ -62,7 +62,7 @@
@@ -85,106 +85,16 @@

Do not have an account? Signup + data-animation-in="fadeIn">S'inscrire

- - - - + {% if app.request.get('_route') != "fos_user_security_login" %} + {{ render(controller('AppBundle:SecurityModal:loginModalV2')) }} + {% endif %}