templates/user_log/user_log.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{ companyName }}| Login{% endblock %}
  3. {% block body %}
  4.     <div class="row white" style="margin-top: -20px">
  5.         <div class="col s12">
  6.             <div class="col s12 l10 offset-l1" data-aos="zoom-out-down" style="margin-bottom: 40px" data-aos-duration="3000">
  7.                 <h3 class="center-align  " style=" font-size: 28px; color: #047ffc; font-family:'Reem Kufi', sans-serif">
  8.                     BIENVENUE SUR <a href="{{ path('app_home') }}"> <img src="{{ asset('img/logo-logercm.png') }}" class="  " style="max-height: 60px" alt=""></a>
  9.                 </h3>
  10.                 <div class="divider col s4 offset-s4 black"></div>
  11.             </div>
  12.         </div>
  13.         <p class="center-align center" style=" font-size: 24px; color: black; font-family:'Reem Kufi', sans-serif">le meilleur site d'achat de ticket de voyage et de réservation des véhicules en ligne.</p>
  14.         <div class="col s12 m10 offset-m1 l11 push-l1">
  15.             <div class="col s12 hide" id="preloadStep2">
  16.                 <div class="progress">
  17.                     <div class="indeterminate pink"></div>
  18.                 </div>
  19.                 <h5 class="center-align center" id="connexionStep" style="margin-top: -10px"><b>connexion...</b></h5>
  20.             </div>
  21.             <div class="col s12  m10 offset-m1  l5   card hoverable z-depth-4 animated zoomIn" style=" box-shadow: 0px 0px 8px 0px #047ffc; border-radius: 20px">
  22.                 <h5 class="center center-align" style="  margin-top: 30px">
  23.                     <span style="font-size: 30px; "> Connectez vous à votre compte. </span>
  24.                 </h5>
  25.                 <div class="divider col s4 offset-s4 black"></div>
  26.                 <br>
  27.                 <form data-aos="zoom-out-down" data-aos-duration="2000" onsubmit="return false;" class="col l12 m12 s12 xl12  " id="login_form_customer" style="margin-top: 2%;">
  28.                     <div class="col   s12      input-field center center-block center-align">
  29.                         <i class="fas fa-user-circle prefix active" style="color:#047ffc;font-size: 24px  ">  </i>
  30.                         <input required="required" type="email" id="username_log" name="username_log" class="validate">
  31.                         <label for="username_log" data-error="wrong" data-success="ok" class="active">Nom d'utilisateur </label>
  32.                         <span id="username_log_check" class="helper-text" data-error="wrong" data-success="ok"></span>
  33.                     </div>
  34.                     
  35.                     <div class="col   s12      input-field center center-block center-align" style="margin-top: -5px">
  36.                         <i class="fas fa-key prefix active" style="color:#047ffc;font-size: 24px  ">  </i>
  37.                         <input required="required" type="password" id="password_log" name="usermane_log" class="validate">
  38.                         <label for="password_log" data-error="wrong" data-success="ok" class="active">Mot de Passe </label>
  39.                         <span id="password_log_check" class="helper-text" data-error="wrong" data-success="ok"></span>
  40.                     </div>
  41.                     <div class="col   s12 hide" id="idShowField" style="margin-bottom: 20px">
  42.                     </div>
  43.                     <div class="col s12" style="margin-top: 2px; margin-bottom: 20px">
  44.                           <span style="margin-top: 10px">En continuant, vous nous autorisez à utiliser vos informations conformément à
  45.                               <a href="index.php?page=term">nos conditions d'utilisation </a> et à notre <a href="index.php?page=term">politique de confidentialité</a>.</span>
  46.                     </div>
  47.                     <button  id="btnCustomerLogin" class="btn waves-effect   waves-light col s10 offset-s1" style=" height: 45px ;background: #047ffc;
  48.     outline: none;
  49.     color: #fff;
  50.     font-weight: 600;
  51.     border: none;
  52.     letter-spacing: 1px;
  53.     text-transform: uppercase;
  54.     cursor: pointer;
  55.     border-radius: 10px;
  56.     transition: 0.5s all;
  57.     -webkit-transition: 0.5s all;
  58.     -o-transition: 0.5s all;
  59.     -moz-transition: 0.5s all;
  60.     -ms-transition: 0.5s all;
  61.     box-shadow: 0px 0px 8px 0px #047ffc;; margin-top: 2% ; border-radius:5px " type="submit"><span>Connexion</span>
  62.                         <i class="fas fa-power-off right active"> </i>
  63.                     </button>
  64.                     <div class="col s12" style="margin-top: 20px">
  65.                         <div class="col s6 left left-align">
  66.                             <p>
  67.                                 <label class="active">
  68.                                     <input type="checkbox">
  69.                                     <span>Maintenir ma session</span>
  70.                                 </label>
  71.                             </p>
  72.                         </div>
  73.                         <div class="col s6 right right-align">
  74.                             <a href="#" class="for">Mot de passe oublié...?</a>
  75.                         </div>
  76.                     </div>
  77.                     <div class="col s12 " style="margin-top: 10px;">
  78.                         <div class="col s5 divider grey accent-2">
  79.                         </div>
  80.                         <div class="col s2">
  81.                             <a href="#!" style="margin-left: 10px; margin-top: -20px" class="btn-floating  grey accent-2"><span style="font-size: 20px; margin-left: 2px" class="center center-align"><b>OU</b></span></a>
  82.                         </div>
  83.                         <div class="col s5   divider grey accent-2"></div>
  84.                     </div>
  85.                     <div class="col s12  m10 offset-m1 center center-align" style="margin-top: 15px">
  86.                         <div style="max-width: 300px; min-width: 200px;" scope="public_profile,email" onlogin="checkLoginState()" class="fb-login-button z-depth-2 hoverable fb_iframe_widget" data-width="200" data-max-rows="1" data-size="large" data-button-type="continue_with" data-use-continue-as="true" login_text="
  87.                     " fb-xfbml-state="rendered" fb-iframe-plugin-query="app_id=203015117013939&amp;button_type=continue_with&amp;container_width=300&amp;locale=en_US&amp;login_text=%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20&amp;max_rows=1&amp;scope=public_profile%2Cemail&amp;sdk=joey&amp;size=large&amp;use_continue_as=true&amp;width=200"><span style="vertical-align: bottom; width: 240px; height: 40px;"><iframe name="f228fd2b68b20d4" width="200px" height="1000px" data-testid="fb:login_button Facebook Social Plugin" title="fb:login_button Facebook Social Plugin" frameborder="0" allowtransparency="true" allowfullscreen="true" scrolling="no" allow="encrypted-media" src="https://web.facebook.com/v3.2/plugins/login_button.php?app_id=203015117013939&amp;button_type=continue_with&amp;channel=https%3A%2F%2Fstaticxx.facebook.com%2Fx%2Fconnect%2Fxd_arbiter%2F%3Fversion%3D46%23cb%3Df1dba3ecd5c8e5c%26domain%3Detravel.cm%26is_canvas%3Dfalse%26origin%3Dhttps%253A%252F%252Fetravel.cm%252Ff1666880857ee0c%26relation%3Dparent.parent&amp;container_width=300&amp;locale=en_US&amp;login_text=%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20&amp;max_rows=1&amp;scope=public_profile%2Cemail&amp;sdk=joey&amp;size=large&amp;use_continue_as=true&amp;width=200" style="border: none; visibility: visible; width: 240px; height: 40px;" class=""></iframe></span></div>
  88.                     </div>
  89.                     <div class="col s12 m10 offset-m1 center center-align" style="margin-top: 15px; margin-bottom: 10px">
  90.                         <div id="signin-button" style="max-width: 300px; min-width: 250px" class="g-signin2 center center-block  z-depth-3 hoverable waves-effect waves-ripple waves-red  " data-onsuccess="onSignIn" data-width="200" data-longtitle="true" data-gapiscan="true" data-onload="true"><div style="height:36px;width:200px;" class="abcRioButton abcRioButtonLightBlue"><div class="abcRioButtonContentWrapper"><div class="abcRioButtonIcon" style="padding:8px"><div style="width:18px;height:18px;" class="abcRioButtonSvgImageWithFallback abcRioButtonIconImage abcRioButtonIconImage18"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="18px" height="18px" viewBox="0 0 48 48" class="abcRioButtonSvg"><g><path fill="#EA4335" d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"></path><path fill="#4285F4" d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"></path><path fill="#FBBC05" d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"></path><path fill="#34A853" d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"></path><path fill="none" d="M0 0h48v48H0z"></path></g></svg></div></div><span style="font-size:13px;line-height:34px;" class="abcRioButtonContents"><span id="not_signed_inc21qjy1f865t">Se connecter avec Google</span><span id="connectedc21qjy1f865t" style="display:none">Connecté avec Google</span></span></div></div></div>
  91.                     </div>
  92.                     <div class="col s12 center center-align" style="margin-top: 10px; margin-bottom: 20px">
  93.                     <span style="font-size: 20px">Vous êtes nouveau?
  94.                         <a href="{{ path('app_register',
  95.                             {'destination': path('app_user_log') })
  96.                         }}">Créez votre compte ici!
  97.                         </a>
  98.                     </span>
  99.                     </div>
  100.                 </form>
  101.             </div>
  102.             <div class="col s12 m10 offset-m1 l6 push-l1 hide-on-med-and-down hide-on-med-only">
  103.                 <img src="{{ asset('img/bannerpng.png') }}" class="  " style="margin-top: 30px; max-height: 450px; max-width: 450px; min-width: 250px; min-height: 250px " alt="">
  104.                 <p style=" font-size: 24px; color: black; font-family:'Reem Kufi', sans-serif">
  105.                     Avec une assistance client 24h/24h, 7j/7j.</p>
  106.                 <a style="background: #047ffc; margin-bottom: 20px;
  107.     outline: none;
  108.     color: #fff;
  109.     font-weight: 600;
  110.     border: none;
  111.     letter-spacing: 1px;
  112.     text-transform: uppercase;
  113.     cursor: pointer;
  114.     border-radius: 10px;
  115.     transition: 0.5s all;
  116.     -webkit-transition: 0.5s all;
  117.     -o-transition: 0.5s all;
  118.     -moz-transition: 0.5s all;
  119.     -ms-transition: 0.5s all;
  120.     box-shadow: 0px 0px 8px 0px #047ffc;; margin-top: 2% " href="{{ path('app_home') }}"   class=" waves-purple waves-effect btn col s10    btn-large  ">
  121.                     <span>Retour à l'accueil</span>
  122.                     <i class="fas fa-home right active"> </i>
  123.                 </a>
  124.             </div>
  125.         </div>
  126.     </div>
  127.     
  128.     
  129.     
  130. {% endblock %}
  131.   {% block javascripts %}
  132.       {{ parent() }}
  133.       
  134.       <script type="text/javascript">
  135.           var Toast = Swal.mixin({
  136.               toast: true,
  137.               position: 'top-end',
  138.               showConfirmButton: false,
  139.               timer: 14000,
  140.               timerProgressBar: true,
  141.               didOpen: (toast) => {
  142.                   toast.addEventListener('mouseenter', Swal.stopTimer)
  143.                   toast.addEventListener('mouseleave', Swal.resumeTimer)
  144.               }
  145.           });
  146.           var apiBaseUrl="{{ host }}"
  147.           var loginUrl="{{ path('authentication_token') }}";
  148.           $('#login_form_customer').submit(function(){
  149.               submitLoginForm()
  150.           });
  151.           
  152.          
  153.           function submitLoginForm() {
  154.               var password_log= $("#password_log").val();
  155.               var username_log= $("#username_log").val();
  156.               $.ajax({
  157.                   method: "POST",
  158.                   tryCount  : 0,
  159.                   retryLimit  : 4,
  160.                   url: loginUrl,
  161.                   "headers": {
  162.                       "Content-Type": "application/json"
  163.                   },
  164.                   data: JSON.stringify({
  165.                       "email": username_log,
  166.                       "password": password_log
  167.                   }),
  168.                   beforeSend:function () {
  169.                       $("#preloadStep2").removeClass("hide");
  170.                       $("#btnSubmitLog").addClass("disabled").html("login in progress...");
  171.                   },
  172.                   success: function(data){
  173.                       $("#preloadStep2").addClass("hide");
  174.                       $("#btnSubmitLog").removeClass("disabled").html("Connexion")
  175.                       setCookie("{{ companyName }}_user_token",data.token,1);
  176.                       setCookie("{{ companyName }}_user_userpass",password_log,1);
  177.                       setCookie("{{ companyName }}_user_username",username_log,1);
  178.                       Toast.fire({
  179.                           icon: 'success',
  180.                           title: "Welcome Back"
  181.                       });
  182.                       document.getElementById("login_form_customer").reset();
  183.                   },
  184.                   error:function (xhr, textStatus, errorThrown) {
  185.                       $("#btnSubmitLog").removeClass("disabled").html("Try Again")
  186.                       $("#preloadStep2").addClass("hide");
  187.                       Toast.fire({
  188.                           icon: 'warning',
  189.                           title: "Invalid Username or Password"
  190.                       });
  191.                       $("#password_log").addClass('invalid');
  192.                       $("#username_log").addClass('invalid');
  193.                   }
  194.               });
  195.           }
  196.           
  197.       </script>
  198.   {% endblock %}