templates/account/account.html.twig line 285

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Les trésors de Luna{% endblock %}
  3. {% block javascripts %}
  4.     <script type="module">
  5.         import FormValidation from '{{asset("js/classes/FormValidation.js")}}'
  6.         window.addEventListener('load', () => {
  7.             
  8.             const registrationForm = document.getElementById('registration_form')
  9.             const excludedInputsId = ['registration_form_agreeTerms', 'registration_form__token']
  10.             const createAccountButton = document.getElementById('create-user-acount-button')
  11.             
  12.             const formValidation = new FormValidation(registrationForm, createAccountButton, excludedInputsId)
  13.             
  14.         })
  15.     </script>
  16. {% endblock javascripts %}
  17. {% block body %}
  18. <body>
  19.     <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
  20.         <defs>
  21.             <symbol xmlns="http://www.w3.org/2000/svg" id="link" viewBox="0 0 24 24">
  22.                 <path fill="currentColor"
  23.                     d="M12 19a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm5 0a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm0-4a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm-5 0a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm7-12h-1V2a1 1 0 0 0-2 0v1H8V2a1 1 0 0 0-2 0v1H5a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3Zm1 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-9h16Zm0-11H4V6a1 1 0 0 1 1-1h1v1a1 1 0 0 0 2 0V5h8v1a1 1 0 0 0 2 0V5h1a1 1 0 0 1 1 1ZM7 15a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm0 4a1 1 0 1 0-1-1a1 1 0 0 0 1 1Z" />
  24.             </symbol>
  25.             <symbol xmlns="http://www.w3.org/2000/svg" id="arrow-right" viewBox="0 0 24 24">
  26.                 <path fill="currentColor"
  27.                     d="M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33a1 1 0 0 0 0-.76Z" />
  28.             </symbol>
  29.             <symbol xmlns="http://www.w3.org/2000/svg" id="category" viewBox="0 0 24 24">
  30.                 <path fill="currentColor"
  31.                     d="M19 5.5h-6.28l-.32-1a3 3 0 0 0-2.84-2H5a3 3 0 0 0-3 3v13a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-10a3 3 0 0 0-3-3Zm1 13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-13a1 1 0 0 1 1-1h4.56a1 1 0 0 1 .95.68l.54 1.64a1 1 0 0 0 .95.68h7a1 1 0 0 1 1 1Z" />
  32.             </symbol>
  33.             <symbol xmlns="http://www.w3.org/2000/svg" id="calendar" viewBox="0 0 24 24">
  34.                 <path fill="currentColor"
  35.                     d="M19 4h-2V3a1 1 0 0 0-2 0v1H9V3a1 1 0 0 0-2 0v1H5a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3Zm1 15a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-7h16Zm0-9H4V7a1 1 0 0 1 1-1h2v1a1 1 0 0 0 2 0V6h6v1a1 1 0 0 0 2 0V6h2a1 1 0 0 1 1 1Z" />
  36.             </symbol>
  37.             <symbol xmlns="http://www.w3.org/2000/svg" id="heart" viewBox="0 0 24 24">
  38.                 <path fill="currentColor"
  39.                     d="M20.16 4.61A6.27 6.27 0 0 0 12 4a6.27 6.27 0 0 0-8.16 9.48l7.45 7.45a1 1 0 0 0 1.42 0l7.45-7.45a6.27 6.27 0 0 0 0-8.87Zm-1.41 7.46L12 18.81l-6.75-6.74a4.28 4.28 0 0 1 3-7.3a4.25 4.25 0 0 1 3 1.25a1 1 0 0 0 1.42 0a4.27 4.27 0 0 1 6 6.05Z" />
  40.             </symbol>
  41.             <symbol xmlns="http://www.w3.org/2000/svg" id="plus" viewBox="0 0 24 24">
  42.                 <path fill="currentColor"
  43.                     d="M19 11h-6V5a1 1 0 0 0-2 0v6H5a1 1 0 0 0 0 2h6v6a1 1 0 0 0 2 0v-6h6a1 1 0 0 0 0-2Z" />
  44.             </symbol>
  45.             <symbol xmlns="http://www.w3.org/2000/svg" id="minus" viewBox="0 0 24 24">
  46.                 <path fill="currentColor" d="M19 11H5a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2Z" />
  47.             </symbol>
  48.             <symbol xmlns="http://www.w3.org/2000/svg" id="cart" viewBox="0 0 24 24">
  49.                 <path fill="currentColor"
  50.                     d="M8.5 19a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 8.5 19ZM19 16H7a1 1 0 0 1 0-2h8.491a3.013 3.013 0 0 0 2.885-2.176l1.585-5.55A1 1 0 0 0 19 5H6.74a3.007 3.007 0 0 0-2.82-2H3a1 1 0 0 0 0 2h.921a1.005 1.005 0 0 1 .962.725l.155.545v.005l1.641 5.742A3 3 0 0 0 7 18h12a1 1 0 0 0 0-2Zm-1.326-9l-1.22 4.274a1.005 1.005 0 0 1-.963.726H8.754l-.255-.892L7.326 7ZM16.5 19a1.5 1.5 0 1 0 1.5 1.5a1.5 1.5 0 0 0-1.5-1.5Z" />
  51.             </symbol>
  52.             <symbol xmlns="http://www.w3.org/2000/svg" id="check" viewBox="0 0 24 24">
  53.                 <path fill="currentColor"
  54.                     d="M18.71 7.21a1 1 0 0 0-1.42 0l-7.45 7.46l-3.13-3.14A1 1 0 1 0 5.29 13l3.84 3.84a1 1 0 0 0 1.42 0l8.16-8.16a1 1 0 0 0 0-1.47Z" />
  55.             </symbol>
  56.             <symbol xmlns="http://www.w3.org/2000/svg" id="trash" viewBox="0 0 24 24">
  57.                 <path fill="currentColor"
  58.                     d="M10 18a1 1 0 0 0 1-1v-6a1 1 0 0 0-2 0v6a1 1 0 0 0 1 1ZM20 6h-4V5a3 3 0 0 0-3-3h-2a3 3 0 0 0-3 3v1H4a1 1 0 0 0 0 2h1v11a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V8h1a1 1 0 0 0 0-2ZM10 5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1h-4Zm7 14a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V8h10Zm-3-1a1 1 0 0 0 1-1v-6a1 1 0 0 0-2 0v6a1 1 0 0 0 1 1Z" />
  59.             </symbol>
  60.             <symbol xmlns="http://www.w3.org/2000/svg" id="star-outline" viewBox="0 0 15 15">
  61.                 <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
  62.                     d="M7.5 9.804L5.337 11l.413-2.533L4 6.674l2.418-.37L7.5 4l1.082 2.304l2.418.37l-1.75 1.793L9.663 11L7.5 9.804Z" />
  63.             </symbol>
  64.             <symbol xmlns="http://www.w3.org/2000/svg" id="star-solid" viewBox="0 0 15 15">
  65.                 <path fill="currentColor"
  66.                     d="M7.953 3.788a.5.5 0 0 0-.906 0L6.08 5.85l-2.154.33a.5.5 0 0 0-.283.843l1.574 1.613l-.373 2.284a.5.5 0 0 0 .736.518l1.92-1.063l1.921 1.063a.5.5 0 0 0 .736-.519l-.373-2.283l1.574-1.613a.5.5 0 0 0-.283-.844L8.921 5.85l-.968-2.062Z" />
  67.             </symbol>
  68.             <symbol xmlns="http://www.w3.org/2000/svg" id="search" viewBox="0 0 24 24">
  69.                 <path fill="currentColor"
  70.                     d="M21.71 20.29L18 16.61A9 9 0 1 0 16.61 18l3.68 3.68a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.39ZM11 18a7 7 0 1 1 7-7a7 7 0 0 1-7 7Z" />
  71.             </symbol>
  72.             <symbol xmlns="http://www.w3.org/2000/svg" id="user" viewBox="0 0 24 24">
  73.                 <path fill="currentColor"
  74.                     d="M15.71 12.71a6 6 0 1 0-7.42 0a10 10 0 0 0-6.22 8.18a1 1 0 0 0 2 .22a8 8 0 0 1 15.9 0a1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1a10 10 0 0 0-6.25-8.19ZM12 12a4 4 0 1 1 4-4a4 4 0 0 1-4 4Z" />
  75.             </symbol>
  76.             <symbol xmlns="http://www.w3.org/2000/svg" id="close" viewBox="0 0 15 15">
  77.                 <path fill="currentColor"
  78.                     d="M7.953 3.788a.5.5 0 0 0-.906 0L6.08 5.85l-2.154.33a.5.5 0 0 0-.283.843l1.574 1.613l-.373 2.284a.5.5 0 0 0 .736.518l1.92-1.063l1.921 1.063a.5.5 0 0 0 .736-.519l-.373-2.283l1.574-1.613a.5.5 0 0 0-.283-.844L8.921 5.85l-.968-2.062Z" />
  79.             </symbol>
  80.         </defs>
  81.     </svg>
  82.     <div class="preloader-wrapper">
  83.         <div class="preloader">
  84.         </div>
  85.     </div>
  86.     <div class="offcanvas offcanvas-end" data-bs-scroll="true" tabindex="-1" id="offcanvasCart"
  87.         aria-labelledby="My Cart">
  88.         <div class="offcanvas-header justify-content-center">
  89.             <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
  90.         </div>
  91.         <div class="offcanvas-body">
  92.             <div class="order-md-last">
  93.                 <h4 class="d-flex justify-content-between align-items-center mb-3">
  94.                     <span class="text-primary">Your cart</span>
  95.                     <span class="badge bg-primary rounded-circle pt-2">3</span>
  96.                 </h4>
  97.                 <ul class="list-group mb-3">
  98.                     <li class="list-group-item d-flex justify-content-between lh-sm">
  99.                         <div>
  100.                             <h6 class="my-0">Grey Hoodie</h6>
  101.                             <small class="text-body-secondary">Brief description</small>
  102.                         </div>
  103.                         <span class="text-body-secondary">$12</span>
  104.                     </li>
  105.                     <li class="list-group-item d-flex justify-content-between lh-sm">
  106.                         <div>
  107.                             <h6 class="my-0">Dog Food</h6>
  108.                             <small class="text-body-secondary">Brief description</small>
  109.                         </div>
  110.                         <span class="text-body-secondary">$8</span>
  111.                     </li>
  112.                     <li class="list-group-item d-flex justify-content-between lh-sm">
  113.                         <div>
  114.                             <h6 class="my-0">Soft Toy</h6>
  115.                             <small class="text-body-secondary">Brief description</small>
  116.                         </div>
  117.                         <span class="text-body-secondary">$5</span>
  118.                     </li>
  119.                     <li class="list-group-item d-flex justify-content-between">
  120.                         <span class="fw-bold">Total (USD)</span>
  121.                         <strong>$20</strong>
  122.                     </li>
  123.                 </ul>
  124.                 <button class="w-100 btn btn-primary btn-lg" type="submit">Continue to checkout</button>
  125.             </div>
  126.         </div>
  127.     </div>
  128.     <div class="offcanvas offcanvas-end" data-bs-scroll="true" tabindex="-1" id="offcanvasSearch"
  129.         aria-labelledby="Search">
  130.         <div class="offcanvas-header justify-content-center">
  131.             <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
  132.         </div>
  133.         <div class="offcanvas-body">
  134.             <div class="order-md-last">
  135.                 <h4 class="text-primary text-uppercase mb-3">
  136.                     Search
  137.                 </h4>
  138.                 {#
  139.                 <div class="search-bar border rounded-2 border-dark-subtle">
  140.                     <form id="search-form" class="text-center d-flex align-items-center" action="" method="">
  141.                         <input type="text" class="form-control border-0 bg-transparent" placeholder="Search Here" />
  142.                         <iconify-icon icon="tabler:search" class="fs-4 me-3"></iconify-icon>
  143.                     </form>
  144.                 </div>
  145.                 #}
  146.             </div>
  147.         </div>
  148.     </div>
  149.     <section id="banner" class="py-3" style="background: #F9F3EC;">
  150.         <div class="container">
  151.             <div class="hero-content py-5 my-3">
  152.                 <h2 class="display-1 mt-3 mb-0">Votre compte</h2>
  153.                 <nav class="breadcrumb">
  154.                     <a class="breadcrumb-item nav-link" href="{{path('app_home')}}">Accueil</a>
  155.                     <span class="breadcrumb-item active" aria-current="page">Compte utilisateur</span>
  156.                 </nav>
  157.             </div>
  158.         </div>
  159.     </section>
  160.     {% for flash_error in app.flashes('verify_email_error') %}
  161.         <div class="alert alert-danger" role="alert">{{ flash_error }}</div>
  162.     {% endfor %}
  163.     <section class="login-tabs padding-large">
  164.         <div class="container my-5 py-5">
  165.             <div class="row">
  166.                 <div class="tabs-listing">
  167.                     <nav>
  168.                         <div class="nav nav-tabs d-flex justify-content-center border-dark-subtle mb-3" id="nav-tab"
  169.                             role="tablist">
  170.                             <button
  171.                                 class="nav-link mx-3 fs-3 border-bottom border-dark-subtle border-0 text-uppercase active"
  172.                                 id="nav-sign-in-tab" data-bs-toggle="tab" data-bs-target="#nav-sign-in" type="button"
  173.                                 role="tab" aria-controls="nav-sign-in" aria-selected="true">Connexion</button>
  174.                             <button class="nav-link mx-3 fs-3 border-bottom border-dark-subtle border-0 text-uppercase"
  175.                                 id="nav-register-tab" data-bs-toggle="tab" data-bs-target="#nav-register" type="button"
  176.                                 role="tab" aria-controls="nav-register" aria-selected="false">Créer un compte</button>
  177.                         </div>
  178.                     </nav>
  179.                     
  180.                     <div class="tab-content" id="nav-tabContent">
  181.                         <div class="tab-pane fade active show" id="nav-sign-in" role="tabpanel"
  182.                             aria-labelledby="nav-sign-in-tab">
  183.                             <div class="col-lg-8 offset-lg-2 mt-5">
  184.                                 {#
  185.                                 <p class="mb-0">Log-In With Social</p>
  186.                                 <hr class="my-1">
  187.                                 #}
  188.                                 <div class="social-wrapper row mt-4 mb-4">
  189.                                     <div class="d-grid col-md-6 my-2">
  190.                                         <div id="g_id_onload"
  191.                                         data-client_id="221318372673-1p9ujk71bfmi1t4a8n5n38c6g8qvs1b4.apps.googleusercontent.com"
  192.                                         data-context="signin"
  193.                                         data-ux_mode="popup"
  194.                                         data-login_uri="https://lestresorsdeluna.fr/connect/google/callback"
  195.                                         data-auto_prompt="false">
  196.                                    </div>
  197.                                    
  198.                                    <div class="g_id_signin"
  199.                                         data-type="standard"
  200.                                         data-shape="rectangular"
  201.                                         data-theme="outline"
  202.                                         data-text="signin_with"
  203.                                         data-size="large"
  204.                                         data-logo_alignment="left">
  205.                                    </div>
  206.                                     </div>
  207.                                     {#
  208.                                     <div class="d-grid col-md-6 my-2">
  209.                                         <a href="#" class="btn btn-outline-dark btn-lg text-uppercase fs-6 rounded-1 ">
  210.                                             <div class="d-flex flex-wrap justify-content-center">
  211.                                                 <iconify-icon icon="ion:logo-facebook"
  212.                                                     class="signup-social-icon me-2"></iconify-icon>
  213.                                                 <p class="mb-0">Facebook</p>
  214.                                             </div>
  215.                                         </a>
  216.                                     </div>
  217.                                     #}
  218.                                 </div>
  219.                                 <p class="mb-0">Connexion par Email</p>
  220.                                 <hr class="my-1">
  221.                                 <form id="login_form" action="{{ path('app_login') }}" data-link="{{path('app_login')}}" method="post" class="form-group flex-wrap ">
  222.                                     {% if error %}
  223.                                     <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  224.                                     {% endif %}
  225.                                     
  226.                                     {% if app.user %}
  227.                                     <div class="mb-3">
  228.                                     Vous êtes connecté à {{ app.user.userIdentifier }}, <a href="{{ path('app_logout') }}">Logout</a>
  229.                                     </div>
  230.                                     {% endif %}                                    
  231.                                     <div class="form-input col-lg-12 my-4">
  232.                                     
  233.                                     <input type="email" value="{{ last_username }}" name="_username" id="username" class="form-control mb-3 p-4" placeholder="Email" autocomplete="email" required autofocus>
  234.                                     <input type="password" name="_password" id="password" class="form-control mb-3 p-4" placeholder="Mot de passe" autocomplete="current-password" aria-describedby="passwordHelpBlock" required>
  235.                                     <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">                                        
  236.                                     
  237.                                     <label class="py-3 d-flex flex-wrap justify-content-between">
  238.                                     <div>
  239.                                     <input type="checkbox" name="_remember_me" class="d-inline">
  240.                                     <span class="label-body ">Se rappeler de moi</span>
  241.                                     </div>
  242.                                     
  243.                                     <div id="passwordHelpBlock" class="form-text ">
  244.                                     <a href="#" class="text-primary  fw-bold"> Mot de passe oublié ?</a>
  245.                                     </div>
  246.                                     </label>
  247.                                     
  248.                                     <div class="d-grid my-3">
  249.                                     <button type="submit" href="#" class="btn btn-dark btn-lg rounded-1">Se connecter</button>
  250.                                     </div>                                     
  251.                                     
  252.                                     </div>
  253.                                     
  254.                                     
  255.                                                                         
  256.                                 </form>
  257.                             </div>
  258.                         </div>
  259.                         <div class="tab-pane fade" id="nav-register" role="tabpanel" aria-labelledby="nav-register-tab">
  260.                             <div class="col-lg-8 offset-lg-2 mt-5">
  261.                                 
  262.                                 {{form_start(registrationForm)}}
  263.                                 <div class="form-input col-lg-12 my-4">
  264.                                     <label style="color: red;" for="registration_form_surname"></label>
  265.                                     {{form_widget(registrationForm.surname)}}
  266.                                     <label style="color: red;" for="registration_form_firstname"></label>
  267.                                     {{form_widget(registrationForm.firstname)}}
  268.                                     <label style="color: red;" for="registration_form_phone"></label>
  269.                                     {{form_widget(registrationForm.phone)}}
  270.                                     <label style="color: red;" for="registration_form_adress"></label>
  271.                                     {{form_widget(registrationForm.adress)}}
  272.                                     <label style="color: red;" for="registration_form_additionalAdressInformation"></label>
  273.                                     {{form_widget(registrationForm.additionalAdressInformation)}}
  274.                                     <label style="color: red;" for="registration_form_city"></label>
  275.                                     {{form_widget(registrationForm.city)}}
  276.                                     <label style="color: red;" for="registration_form_zipcode"></label>
  277.                                     {{form_widget(registrationForm.zipcode)}}
  278.                                     <label style="color: red;" for="registration_form_email"></label>
  279.                                     {{form_widget(registrationForm.email)}}
  280.                                     <div class="errors" style="color: red;">
  281.                                         {{ form_errors(registrationForm.plainPassword) }}
  282.                                     </div>
  283.                                     <label style="color: red;" for="registration_form_plainPassword"></label>
  284.                                     {{form_widget(registrationForm.plainPassword)}}
  285.                                     <label id="repeated-pass-label" style="color: red;" for="inputPassword2"></label>
  286.                                     <input type="password" id="inputPassword2" placeholder="Retapez votre mot de passe"
  287.                                     class="form-control mb-3 p-4 formValidationCode" aria-describedby="passwordHelpBlock" required>
  288.                                     <label class="py-3 d-flex flex-wrap justify-content-between">
  289.                                         <div>
  290.                                             {{form_widget(registrationForm.agreeTerms)}}
  291.                                             {{form_label(registrationForm.agreeTerms)}} <a style="font-size: 1rem; color: black; font-weight: bold;" href="{{path('cgv')}}" target="_blank">Lire les CGV</a>
  292.                                             
  293.                                         </div>
  294.                                     </label>
  295.                                     <div class="d-grid my-3">
  296.                                         <button id="create-user-acount-button" type="submit" class="btn btn-dark btn-lg rounded-1">Créer le compte</a>
  297.                                     </div>
  298.                                 </div>
  299.                                 {{form_end(registrationForm)}}
  300.                             </div>
  301.                         </div>
  302.                     </div>
  303.                 </div>
  304.             </div>
  305.         </div>
  306.     </section>
  307.     <script src="{{asset('js/login.js')}}"></script>
  308. </body>
  309. {% endblock %}