templates/security/index.html.twig line 1

Open in your IDE?
  1. {% extends 'custom-base.html.twig' %}
  2. {% block body %}
  3.                  <!-- CONTAINER OPEN -->
  4.                 <div class="col col-login mx-auto mt-7">
  5.                     <div class="text-center">
  6.                         <a href="{{absolute_url(path('app_home'))}}"><img src="{{absolute_url(asset('/cpe/build/images/brand/leadplanet-logo-4.png'))}}" class="header-brand-img" alt=""></a>
  7.                     </div>
  8.                 </div>
  9.                 <div class="container-login100">
  10.                     <div class="wrap-login100 p-6">
  11.                         {% if error is defined and error %}
  12.                             {% if error.message is same as 'Un nouveau code a été envoyé par SMS. Veuillez entrer le code pour continuer.' or error.message is same as 'Un code a été envoyé par SMS. Veuillez entrer le code pour continuer.' %}
  13.                                 <div class="alert alert-success">{{ error.message|raw }}</div>
  14.                             {% else %}
  15.                                 <div class="alert alert-danger">{{ error.message|raw }}</div>
  16.                             {% endif %}
  17.                         {% endif %}
  18.                         {% if app.user %}
  19.                             <div class="mb-3">
  20.                                 You are logged in as {{ app.user.userIdentifier }}, <a href="{{ absolute_url(path('app_logout')) }}">Logout</a>
  21.                             </div>
  22.                         {% endif %}
  23.                         {% if app.session.get('user_pending') %}
  24.                             <form method="post">
  25.                                 <div class="form-group">
  26.                                     <label for="sms_code" class="bold">Code SMS*</label>
  27.                                     <input type="text" id="sms_code" name="sms_code" maxlength="6" pattern="\d{6}" required class="form-control" placeholder="123456">
  28.                                 </div>
  29.                                 <div class="flex flex-row space-between center mt-20 mb-10">
  30.                                     <button type="submit" class="btn-primary btn mr-15">Valider le code sms</button>
  31.                                     <button type="reset" class="btn btn-secondary mr-15">Annuler</button>
  32.                                 </div>
  33.                                 <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
  34.                             </form>
  35.                             <br>
  36.                             {# Lien pour renvoyer le code #}
  37.                             <form method="post" action="" class="flex just-end">
  38.                                 <input type="hidden" name="resend_code" value="true">
  39.                                 <button type="submit" class="btn btn-success mr-15">Renvoyer le code SMS</button>
  40.                             </form>
  41.                         {% else %}
  42.                                 <form class="login100-form validate-form" method="post">
  43.                                     <span class="login100-form-title pb-5">
  44.                                         Connexion
  45.                                     </span>
  46.                                     {% for label, messages in app.flashes %}
  47.                                         <div class="mt-20 alert alert-{{ label }}">
  48.                                             {% for message in messages %}
  49.                                                 <p class="m-tb-auto">{{ message|raw }}</p>
  50.                                             {% endfor %}
  51.                                         </div>
  52.                                     {% endfor %}
  53.                                     <div class="panel panel-primary">
  54.                                         <div class="panel-body tabs-menu-body p-0 pt-5">
  55.                                             <div class="tab-content">
  56.                                                 <div class="tab-pane active" id="tab5">
  57.                                                     <div class="wrap-input100 validate-input input-group" data-bs-validate="Valid email is required: ex@abc.xyz">
  58.                                                         <a href="javascript:void(0)" class="input-group-text bg-white text-muted">
  59.                                                             <i class="zmdi zmdi-email text-muted" aria-hidden="true"></i>
  60.                                                         </a>
  61.                                                         <input type="email" class="input100 border-start-0 form-control ms-0" id="email" name="email" value="{{ last_username }}" placeholder="Email" required autofocus>
  62.                                                     </div>
  63.                                                     <div class="wrap-input100 validate-input input-group" id="Password-toggle">
  64.                                                         <a href="javascript:void(0)" class="input-group-text bg-white text-muted">
  65.                                                             <i class="zmdi zmdi-eye text-muted" aria-hidden="true"></i>
  66.                                                         </a>
  67.                                                         <input type="password" id="password" name="password" placeholder="Mot de passe" class="input100 border-start-0 form-control ms-0" required>
  68.                                                     </div>
  69.                                                     <div class="text-end pt-4">
  70.                                                         <p class="mb-0"><a href="{{absolute_url(path('app_forgot_password'))}}" class="text-primary ms-1">Mot de passe oublié ?</a></p>
  71.                                                     </div>
  72.                                                     <div class="container-login100-form-btn">
  73.                                                         <input type="submit" class="login100-form-btn btn-primary" value="Se connecter">
  74.                                                     </div>
  75.                                                     <div class="text-center pt-3">
  76.                                                         <p class="text-dark mb-0">Pas encore membre ?<a href="{{absolute_url(path('app_register'))}}" class="text-primary ms-1">S'inscrire</a></p>
  77.                                                     </div>
  78.                                                     <div class="text-center pt-3">
  79.                                                         <p class="text-dark mb-0">Aucun email de vérification ?<a href="{{absolute_url(path('resend_verification_email'))}}" class="text-primary ms-1">Renvoyer l'email</a></p>
  80.                                                     </div>
  81.                                                     <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
  82.                                                     {#<label class="login-social-icon"><span>Login with Social</span></label>
  83.                                                     <div class="d-flex justify-content-center">
  84.                                                         <a href="javascript:void(0)">
  85.                                                             <div class="social-login me-4 text-center">
  86.                                                                 <i class="fa fa-google"></i>
  87.                                                             </div>
  88.                                                         </a>
  89.                                                         <a href="javascript:void(0)">
  90.                                                             <div class="social-login me-4 text-center">
  91.                                                                 <i class="fa fa-facebook"></i>
  92.                                                             </div>
  93.                                                         </a>
  94.                                                         <a href="javascript:void(0)">
  95.                                                             <div class="social-login text-center">
  96.                                                                 <i class="fa fa-twitter"></i>
  97.                                                             </div>
  98.                                                         </a>
  99.                                                     </div>#}
  100.                                                 </div>
  101.                                             </div>
  102.                                         </div>
  103.                                     </div>
  104.                                 </form>
  105.                         {% endif %}
  106.                     </div>
  107.                 </div>
  108.                 <!-- CONTAINER CLOSED -->
  109. {% endblock %}
  110. {% block javascripts %}
  111.    {{parent()}} 
  112.     <!-- SHOW PASSWORD JS -->
  113.     <script src="{{absolute_url(asset('/cpe/build/plugins/show-password/show-password.min.js'))}}"></script>
  114.     <!-- GENERATE OTP JS -->
  115.     {{ encore_entry_script_tags('js/generate-otp') }}
  116.         
  117. {% endblock %}