templates/homepage.html.twig line 1

Open in your IDE?
  1. {% extends "partials/base.html.twig" %}
  2. {% block body %}
  3.     <div class="container h-100 d-flex" id="login-page">
  4.         <div class="row align-items-center g-lg-5">
  5.             <div class="col-lg-7 text-center text-lg-start">
  6.                 <svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 266.5 288.7" style="enable-background:new 0 0 266.5 288.7;" xml:space="preserve">
  7.             <style type="text/css">
  8.                 .st0{fill:#e9eef9;}
  9.             </style>
  10.                     <path class="st0" d="M180.5,280.7c-37,0-67.1-30.1-67.1-67.1V78.5h32.7v135.1c0,18.9,15.4,34.4,34.4,34.4V280.7z"/>
  11.                     <path class="st0" d="M86,209.8H53.2v-79.3c0-18.9-15.4-34.4-34.4-34.4V63.4c37,0,67.1,30.1,67.1,67.1V209.8z"/>
  12.                     <path class="st0" d="M213.2,210.4h-32.7V75.1c0-37,30.1-67.1,67.1-67.1v32.7c-18.9,0-34.4,15.4-34.4,34.4V210.4z"/>
  13.                     <path class="st0" d="M85.1,35.6c0,9-7.3,16.4-16.4,16.4s-16.4-7.3-16.4-16.4c0-9,7.3-16.4,16.4-16.4S85.1,26.6,85.1,35.6"/>
  14.                     <path class="st0" d="M258.8,119.4c0,9-7.3,16.4-16.4,16.4c-9,0-16.4-7.3-16.4-16.4c0-9,7.3-16.4,16.4-16.4
  15.                 C251.5,103.1,258.8,110.4,258.8,119.4"/>
  16.                     <path class="st0" d="M135.3,139.5L135.3,139.5l-0.1-32.7H168C168,124.8,153.4,139.5,135.3,139.5"/>
  17.             </svg>
  18.                 <h1 class="display-4 fw-bold lh-1 mb-3">
  19.                     <strong>MAX</strong>
  20.                     L’outil de candidature et&nbsp;d’admissibilité
  21.                 </h1>
  22.                 <p class="col-lg-10 fs-4 fw-bold mb-0 text-primary">par interfor</p>
  23.                 <h2 class="mb-4 fw-light">Max c’est Maximiser</h2>
  24.                 <ul class="text-left mb-4 checklist d-none d-lg-flex" >
  25.                     <li ><i class="fa-solid fa-check"></i> Le choix de l’orientation</li>
  26.                     <li><i class="fa-solid fa-check"></i> La réussite de votre projet professionnel</li>
  27.                     <li><i class="fa-solid fa-check"></i> Les chances de décrocher un contrat en alternance</li>
  28.                 </ul>
  29. {#                <h5 class="mb-0"><a class="link-dark" style="text-decoration: none" href="http://www.interfor.fr" target="_blank">Accéder au site Interfor</a></h5>#}
  30.                 {#                <h2 class="alert alert-info">Interfor est actuellement fermé jusqu'au 15 août inclus. Le traitement de vos dossiers et de vos questions reprendra après cette date. <br>Merci de votre compréhension et à bientôt sur Max-interfor.fr </h2>#}
  31.             </div>
  32.             <div class="col-md-10 mx-auto col-lg-5">
  33.                 <div class="p-4 p-md-5 rounded-3 bg-light">
  34.                     <h3 class="mb-4 d-none d-lg-flex">Organisation du parcours : </h3>
  35.                     <ul class="text-left mb-4 checklist d-none d-lg-flex" >
  36.                         <li><i class="fa-solid fa-check"></i> Une inscription</li>
  37.                         <li><i class="fa-solid fa-check"></i> Vous envoyez vos Pièces Jointes</li>
  38.                         <li><i class="fa-solid fa-check"></i> Une étape QUIZ</li>
  39.                         <li><i class="fa-solid fa-check"></i> Recherche entreprise</li>
  40.                         <li><i class="fa-solid fa-check"></i> Nous remplissons avec vous votre engagement</li>
  41.                     </ul>
  42.                     <p class="text-center text-lg-start"><i class="fas fa-users"></i> Avec un accompagnement personnalisé, au bon endroit, au bon moment. <a href="https://interfor-formations.fr/" target="_blank">En&nbsp;savoir&nbsp;plus</a></p>
  43.                     <a class="w-100 btn btn-lg btn-primary mb-2 shadow" data-toggle="modal" data-target="#registerModal" href="#">Je crée mon compte</a>
  44.                     <a class="w-100 btn btn-lg btn-secondary shadow" data-toggle="modal" data-target="#loginModal" href="#">Je me connecte</a>
  45.                     <hr class="my-3">
  46.                     <div class="text-lg-center">
  47.                         <p><a href="{{ path('company') }}" class="btn btn-link">Espace entreprise</a></p>
  48.                         <p class="mb-0"><a class="btn btn-outline-primary " style="text-decoration: none" href="http://www.interfor.fr" target="_blank">Accéder au site Interfor</a></p>
  49.                     </div>
  50.                 </div>
  51.             </div>
  52.         </div>
  53.     </div>
  54.     <div class="modal right fade "  id="registerModal" tabindex="-1" role="dialog" aria-labelledby="registerModalLabel" aria-hidden="true">
  55.         <div class="modal-dialog" role="document">
  56.             <div class="modal-content">
  57.                 <div class="modal-header">
  58.                     <h5 class="modal-title" id="exampleModalLabel">Je m'inscris</h5>
  59.                     <button id="closeRegister" type="button" class="close" data-dismiss="modal" aria-label="Close">
  60.                         <span aria-hidden="true">&times;</span>
  61.                     </button>
  62.                 </div>
  63.                 <div class="modal-body">
  64.                     <p class="alert-info mb-4"><strong> Parcoursup : </strong> Attention, il faut vous inscrire sur Parcoursup préalablement. Si vous l’avez déjà fait vous allez être contacté prochainement.
  65.                         <span id="idConnectSubscription" class="red">
  66.                                 {% if registerError is defined %}
  67.                                     </br>{{ registerError }}
  68.                                 {% endif %}
  69.                             </span>
  70.                     </p>
  71.                     {{ form_start(form) }}
  72.                     <div class="form-group mb-3">
  73.                         {{ form_label(form.lastname) }}
  74.                         {{ form_widget(form.lastname, {'attr': {'class': 'form-control'}}) }}
  75.                         <div class="label-error">
  76.                             {{ form_errors(form.lastname) }}
  77.                         </div>
  78.                     </div>
  79.                     <div class="form-group mb-3">
  80.                         {{ form_label(form.firstname) }}
  81.                         {{ form_widget(form.firstname, {'attr': {'class': 'form-control'}}) }}
  82.                         <div class="label-error">
  83.                             {{ form_errors(form.firstname) }}
  84.                         </div>
  85.                     </div>
  86.                     <div class="form-group mb-3">
  87.                         {{ form_label(form.phone) }}
  88.                         {{ form_widget(form.phone, {'attr': {'class': 'form-control', 'pattern' : '0[1-9][0-9]{8}', 'placeholder': 'ex : 0600000000', 'maxlength' : '10', 'id': 'phonecheck'}}) }}
  89.                         <div class="label-error" id="labelErrorPhone">
  90.                             {{ form_errors(form.phone) }}
  91.                         </div>
  92.                     </div>
  93.                     <div class="form-group mb-3">
  94.                         {{ form_label(form.email) }}
  95.                         {{ form_widget(form.email, {'attr': {'class': 'form-control', "pattern" : "[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+.[a-zA-Z.]{2,15}"}}) }}
  96.                         <div class="label-error">
  97.                             {{ form_errors(form.email) }}
  98.                         </div>
  99.                     </div>
  100.                     <div class="form-group mb-3">
  101.                         <label for="pwd" class="required">Mot de passe</label>
  102.                         <div class="input-group">
  103.                             <span class="input-group-text"><i class="fa-solid fa-key"></i></span>
  104.                             <input type="password" name="password" id="pwd" class="form-control" autocomplete="current-password" required placeholder="Mot de passe">
  105.                             <span class="input-group-text showPassword" id="eye">
  106.                                         <i class="fa-solid fa-eye"></i>
  107.                                     </span>
  108.                         </div>
  109.                     </div>
  110.                     <div class="form-group mb-2">
  111.                         <div class="input-group">
  112.                             <span class="input-group-text"><i class="fa-solid fa-key"></i></span>
  113.                             <input type="password" name="password2" id="pwd2" class="form-control"  onKeyUp="check(event)" autocomplete="current-password" required placeholder="Répéter le mot de passe">
  114.                             <span class="input-group-text showPassword" id="eye2">
  115.                                         <i class="fa-solid fa-eye"></i>
  116.                                     </span>
  117.                         </div>
  118.                     </div>
  119.                     <div class="col-sm-6">
  120.                         <div id="error" class="error" style="display: none; color: red">Les mots de passe ne correspondent pas</div>
  121.                     </div>
  122.                     <div class="form-check mb-4 mt-4">
  123.                         {{ form_widget(form.rgpd, {'attr': {'class': 'form-check-input'}}) }}
  124.                         {{ form_label(form.rgpd) }}
  125.                     </div>
  126.                     <div class="form-group">
  127.                         {{ form_label(form.save) }}
  128.                         {{ form_widget(form.save, {'attr': {'class': 'btn btn-primary btn-lg d-none', 'onclick':'checkPhone(event)'}}) }}
  129.                     </div>
  130.                     <div class="btn btn-primary btn-lg" onclick="checkPhone(event)">S'inscrire</div>
  131.                     <div class="label-error">
  132.                         {{ form_errors(form) }}
  133.                     </div>
  134.                     {{ form_end(form) }}
  135.                 </div>
  136.             </div>
  137.         </div>
  138.     </div>
  139.     <div class="modal right fade "  id="loginModal" tabindex="-1" role="dialog" aria-labelledby="loginModalLabel" aria-hidden="true">
  140.         <div class="modal-dialog" role="document">
  141.             <div class="modal-content">
  142.                 <div class="modal-header">
  143.                     <h5 class="modal-title" id="exampleModalLabel">Je me connecte</h5>
  144.                     <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  145.                         <span aria-hidden="true">&times;</span>
  146.                     </button>
  147.                 </div>
  148.                 <div class="modal-body">
  149.                     {% for message in app.flashes('success') %}
  150.                         <script>
  151.                             $('#snackbar').html('{{ message }}').addClass('show');
  152.                             // After 3 seconds, remove the show class from DIV
  153.                             setTimeout(function(){ $('#snackbar').removeClass('show'); }, 3000);
  154.                         </script>
  155.                     {% endfor %}
  156.                     <form method="POST" action="{{ path('app_login') }}" name="login_form">
  157.                         {% if error %}
  158.                             <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  159.                         {% endif %}
  160.                         <div class="form-group mb-3">
  161.                             <label for="inputEmail">Numéro de téléphone</label>
  162.                             <input type="text" value="{{ last_username }}" name="inputPhone" id="inputEmail" class="form-control" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" maxlength="14" autocomplete="email" required autofocus>
  163.                         </div>
  164.                         <div class="form-group mb-3">
  165.                             <label for="inputPassword">Mot de passe</label>
  166.                             <input type="password" name="inputPassword" id="inputPassword" class="form-control" autocomplete="current-password" required>
  167.                         </div>
  168.                         <input type="hidden" name="_csrf_token"  value="{{ csrf_token('authenticate') }}">
  169.                         <div id="idConnect" class="red mt-1" ></div>
  170.                         <div class="form-group ">
  171.                             <a onclick="login(event)"  class="btn btn-lg btn-success">Valider</a>
  172.                         </div>
  173.                         <hr class="my-4">
  174.                         {# <a class="btn btn-link" href="{{ path('app_forgotten_password') }}">Mot de passe oublié ?</a> #}
  175.                         <a class="btn btn-link" onclick="closeLoginModal()" data-toggle="modal" data-target="#forgotPasswordModal">Mot de passe oublié ?</a>
  176.                     </form>
  177.                 </div>
  178.             </div>
  179.         </div>
  180.     </div>
  181.     <div class="modal right fade "  id="forgotPasswordModal" tabindex="-1" role="dialog" aria-labelledby="forgotPasswordModalLabel" aria-hidden="true">
  182.         <div class="modal-dialog" role="document">
  183.             <div class="modal-content">
  184.                 <div class="modal-header">
  185.                     <h5 class="modal-title" id="exampleModalLabel">Mot de passe oublié</h5>
  186.                     <button id="closeForgotPasswordModal" type="button" class="close" data-dismiss="modal" aria-label="Close">
  187.                         <span aria-hidden="true">&times;</span>
  188.                     </button>
  189.                 </div>
  190.                 <div class="modal-body">
  191.                     <span id="successForgotPassword" class="green"></span>
  192.                     <span id="errorForgotPassword" class="red">
  193.                             </span>
  194.                     <form method="POST" action="{{ path('app_forgotten_password') }}" name="forgot_password_form">
  195.                         {% if error %}
  196.                             <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  197.                         {% endif %}
  198.                         <div class="form-group mb-3">
  199.                             <label for="inputEmail">E-mail</label>
  200.                             <input id="forgot-email" placeholder="Votre email" type="text" name="email" class="form-control">
  201.                         </div>
  202.                         <div class="form-group">
  203.                             <a onclick="forgotPassword(event)" class="btn btn-lg btn-success">Envoyer</a>
  204.                         </div>
  205.                     </form>
  206.                 </div>
  207.             </div>
  208.         </div>
  209.     </div>
  210.     <div class="modal right fade "  id="verifySmsModal" tabindex="-1" role="dialog" aria-labelledby="verifySmsModalLabel" aria-hidden="true">
  211.         <div class="modal-dialog" role="document">
  212.             <div class="modal-content">
  213.                 <div class="modal-header">
  214.                     <h5 class="modal-title" id="exampleModalLabel">Vérifications en 2 étapes</h5>
  215.                     <!--<button id="closeverifySmsModal" type="button" class="close" data-dismiss="modal" aria-label="Close">
  216.                         <span aria-hidden="true">&times;</span>
  217.                     </button>-->
  218.                 </div>
  219.                 <p id="smsError" class="alert alert-danger d-none">
  220.                     Code erroné
  221.                 </p>
  222.                 <p id="smsResend" class="alert alert-success d-none">
  223.                     Un code vous a été renvoyé
  224.                 </p>
  225.                 <div class="modal-body text-center">
  226.                     <span id="successVerifySms" class="text-success"></span>
  227.                     <span id="errorVerifySms" class="text-danger"></span>
  228.                     <p class="my-4">Veuillez entrer le code à <strong class="text-primary">6 chiffres</strong><br />envoyé sur votre téléphone <i class="fa-solid text-primary fa-mobile-screen-button"></i> <span id="phone_verify"></span></p>
  229.                     <input class="form-control form-control-lg" id="inputCode" type="text" pattern="[0-9]{6}" style="max-width: 60%; margin: auto;" maxlength="6" required />
  230.                     <p class="my-4"><strong>Vous n'avez pas reçu de sms ?</strong><br /><a id="resend-link" onclick="resendCode()" class="btn btn-sm my-2 btn-outline-primary disabled-link">renvoyez le code</a><br /><span id="timer">dans 60 secondes</span></p>
  231.                     <button id='btn-submit' class="btn btn-lg btn-success" onclick="sendCode()"><i class="fa-solid fa-check"></i> Valider le code</button>
  232.                 </div>
  233.             </div>
  234.         </div>
  235.     </div>
  236.     {% if message is defined and message is not null %}
  237.         <button type="button" id="modalHomeTextButton" style="display:none;" data-toggle="modal" data-target="#modalHomeText"></button>
  238.         <div class="modal fade" id="modalHomeText" tabindex="-1" role="dialog" aria-keyshortcuts="true" aria-labelledby="modalLabel" aria-hidden="true" style="display: none">
  239.             <div class="modal-dialog modal-dialog-centered" role="document">
  240.                 <div class="modal-content" style="max-width: 30em">
  241.                     <div>
  242.                         <div class="">
  243.                             <button type="button" class="closeModal close btn btn-outline-secondary" data-dismiss="modal" aria-label="Close">
  244.                                 <span aria-hidden="true" class="ion-ios-close">x</span>
  245.                             </button>
  246.                             <img src="{{ message.pictureUrl }}" width="100%"/>
  247.                         </div>
  248.                         <div class=" ">
  249.                             <div class="modal-body  d-flex align-items-center">
  250.                                 <div class="text w-40 text-center mt-3">
  251.                                     <h2 class="mb-2">{{ message.title }}</h2>
  252.                                     <h4 class="mb-4">{{ message.text }}</h4>
  253.                                 </div>
  254.                             </div>
  255.                         </div>
  256.                     </div>
  257.                 </div>
  258.             </div>
  259.         </div>
  260.     {% endif %}
  261.     {% block javascript %}
  262.     <script>
  263.           window.onload = function() {
  264.           if("{{registerError is defined}}"){
  265.                       $('#registerModal').modal('show');
  266.                   }
  267.               }
  268.               window.onload = function() {
  269.                   window.setInterval(diminuerTemps, 1000)
  270.                   {% if message is defined and message is not null %}
  271.                         const modal = document.getElementById('modalHomeText');
  272.                         document.getElementById('modalHomeTextButton').click();
  273.                   {% endif %}
  274.               }
  275.                 const modal = document.getElementById('modalHomeText') ? document.getElementById('modalHomeText') : null;
  276.               function closeModalHomeText(){
  277.                  document.getElementById('modalHomeTextButton').click();
  278.             }
  279.               document.getElementById("eye").addEventListener("click", function(e){
  280.                   var pwd = document.getElementById("pwd");
  281.                   console.log(pwd.getAttribute("type"))
  282.                   if(pwd.getAttribute("type")=="password"){
  283.                       pwd.setAttribute("type","text");
  284.                   } else {
  285.                       pwd.setAttribute("type","password");
  286.                   }
  287.               });
  288.               document.getElementById("eye2").addEventListener("click", function(e){
  289.                   var pwd2 = document.getElementById("pwd2");
  290.                   if(pwd2.getAttribute("type")=="password"){
  291.                   pwd2.setAttribute("type","text");
  292.               } else {
  293.                   pwd2.setAttribute("type","password");
  294.               }
  295.               });
  296.               // $(document).ready(function(e) {
  297.               function check(evt){
  298.                   var password = $("#pwd").val();
  299.                   var confirmPassword = $("#pwd2").val();
  300.                   if (password != confirmPassword) {
  301.                       $('#error').css('display', 'block')
  302.                       $("#submit").prop('disabled', true)
  303.                   }
  304.                   else {
  305.                       $('#error').css('display', 'none')
  306.                       $("#submit").prop('disabled', false)
  307.                   }
  308.               };
  309.                   // $(document).ready(function(e) {
  310.               function checkPhone(evt){
  311.                   $('#labelErrorPhone').html('');
  312.                   let form = document.querySelector('[name="user_form"]');
  313.                   var phone = $("#user_form_phone").val();
  314.                   var email = $("#user_form_email").val();
  315.                   console.log($("#user_form_phone").length, form)
  316.                   if(phone != null && phone.length > 4 && email != null && email.length > 4) {
  317.                       if ($("#pwd").val() === $("#pwd2").val()) {
  318.                           if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email) === true) {
  319.                                $.ajax({
  320.                                   type: "POST",
  321.                                   url: "{{ path('app_check_phone') }}",
  322.                                   data: {
  323.                                       'phone': phone,
  324.                                   },
  325.                                   dataType: 'html',
  326.                                   success: function(data) {
  327.                                       if (data == 'true'){
  328.                                           $("#submit").prop('disabled', true)
  329.                                           $('#idConnectSubscription').append("<br> Numéro de téléphone existe déjà, veuillez vous connecter");
  330.                                           evt.preventDefault();
  331.                                       }
  332.                                       else {
  333.                                            form.submit();
  334.                                       }
  335.                                   }
  336.                                });
  337.                           }
  338.                           else {
  339.                                    $('#idConnectSubscription').append("<br> Email invalide");
  340.                           }
  341.                       }
  342.                       else {
  343.                           $('#idConnectSubscription').append("<br> Les mots de passe ne correspondent pas");
  344.                       }
  345.                   }
  346.                   else {
  347.                        $("#submit").prop('disabled', true)
  348.                        $('#idConnectSubscription').html('')
  349.                       $('#idConnectSubscription').append("<br>  Veuillez remplir tous les champs");
  350.                       evt.preventDefault();
  351.                   }
  352.               }
  353.               function login(evt) {
  354.                   var phone = $('input[name="inputPhone"]').val();
  355.                   var password = $('input[name="inputPassword"]').val();
  356.                   let form = document.querySelector('[name="login_form"]');
  357.                   evt.preventDefault();
  358.                       $('#idConnect').html('');
  359.                   $.ajax({
  360.                       type: "POST",
  361.                       url: "{{ path('app_login_user') }}",
  362.                   data: {
  363.                       'phone': phone,
  364.                       'password': password,
  365.                   },
  366.                   dataType: 'html',
  367.                   success: function(data) {
  368.                       if (data == 'true'){
  369.                           form.submit();
  370.                       }
  371.                   else {
  372.                       $('#idConnect').append("Numéro de téléphone et ou mot de passe sont incorrect");
  373.                   }
  374.                   }
  375.                   });
  376.               }
  377.               function forgotPassword(evt) {
  378.                   var email = $('#forgot-email').val();
  379.                   evt.preventDefault();
  380.                   $.ajax({
  381.                       type: "POST",
  382.                       url: "{{ path('app_forgotten_password') }}",
  383.                       data: {
  384.                           'email': email,
  385.                       },
  386.                       success: function(data) {
  387.                           if(data == false){
  388.                               $('#successForgotPassword').html('')
  389.                               $('#errorForgotPassword').html('Aucun e-mail correspondant n\'a été trouvé<br>');
  390.                           }else{
  391.                               $('#errorForgotPassword').html('')
  392.                               $('#successForgotPassword').html('Un e-mail vous a été envoyé');
  393.                           }
  394.                           console.log(data)
  395.                   }
  396.                   });
  397.               }
  398.           // SMS VERIFY
  399.           const timerElement = document.getElementById("timer")
  400.           let timer = 60
  401.           function createCode(){
  402.               // console.log('test');
  403.               // $.ajax({
  404.               //     type: "POST",
  405.               //     url: "/verify/create",
  406.               //     data: {'data':$("[name='user_form']").serialize()}, // serializes the form's elements.
  407.               //     success: function(data)
  408.               //     {
  409.               //         $('#closeRegister').click();
  410.               //         $('#phone_verify').html($('inputEmail').val())
  411.               //         $('#verifySmsModal').modal('show');
  412.               //         resetTimer()
  413.               //         console.log(data);
  414.               //
  415.               //     }
  416.               //     });
  417.               //
  418.               // return false; // avoid to execute the actual submit of the form.
  419.           }
  420.           function sendCode(){
  421.                   $("#btn-submit").attr('disabled', true);
  422.               console.log($('#inputCode').val())
  423.               const code = $('#inputCode').val();
  424.               $('#smsError').addClass('d-none')
  425.               $.ajax({
  426.                   type: "POST",
  427.                   url: "/verify/code",
  428.                   data: {'code':code}, // serializes the form's elements.
  429.                   success: function(data)
  430.                   {
  431.                       resetTimer()
  432.                       console.log(data);
  433.                       if(data == false){
  434.                           $('#smsError').removeClass('d-none')
  435.                            $("#btn-submit").attr('disabled', false);
  436.                       }else{
  437.                           window.location.reload()
  438.                       }
  439.                   }
  440.               });
  441.           }
  442.           function resendCode(){
  443.               const code = $('#inputCode').val();
  444.               $('#smsResend').addClass('d-none')
  445.               $.ajax({
  446.                   type: "POST",
  447.                   url: "/resend/sms",
  448.                   data: {'data':$("[name='user_form']").serialize()}, // serializes the form's elements.
  449.                   success: function(data)
  450.                   {
  451.                       resetTimer()
  452.                       console.log(data);
  453.                       if(data == true){
  454.                           $('#smsResend').removeClass('d-none')
  455.                       }
  456.                   }
  457.               });
  458.           }
  459.           function diminuerTemps() {
  460.               if(timer < 1){
  461.                   $('#resend-link').removeClass('disabled-link')
  462.                   timerElement.innerText = ''
  463.               }else{
  464.                   timerElement.innerText = "dans " +timer+ " secondes"
  465.                   timer--
  466.               }
  467.           }
  468.           function resetTimer(){
  469.               $('#resend-link').addClass('disabled-link')
  470.               timer = 60
  471.           }
  472.       </script>
  473.       {% endblock %}
  474. {% endblock %}