templates/utilisateur/connexion.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.   <head>
  4.     <!-- Required meta tags -->
  5.     <meta charset="utf-8">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7.     <!-- Meta -->
  8.     <meta name="description" content="Click'n Requête - Défendre vos libertés fondamentales">
  9.     <meta name="author" content="Syntexta.fr">
  10.     <title>Admin-Mitih</title>
  11.     <!-- vendor css -->
  12.     <link href="{{ asset('lib/@fortawesome/fontawesome-free/css/all.min.css') }}" rel="stylesheet">
  13.     <link href="{{ asset('lib/ionicons/css/ionicons.min.css') }}" rel="stylesheet">
  14.     <!-- DashForge CSS -->
  15.     <link rel="stylesheet" href="{{ asset('assets/css/dashforge.css') }}">
  16.     <link rel="stylesheet" href="{{ asset('assets/css/dashforge.auth.css') }}">
  17.   </head>
  18.   <body>
  19.     <div class="content content-fixed content-auth">
  20.       <div class="container">
  21.         <div class="media align-items-stretch justify-content-center ht-100p pos-relative">
  22.           
  23.           <form id="form_cnx" method="post">
  24.           <div class="sign-wrapper">
  25.             <div class="wd-100p">
  26.               <div class="mx-wd-100p text-center">
  27.                 <img class="img-fluid" alt="" src="https://mitih-admin.synexta-developpement.fr/uploads/logo/logo.png" style="width: 200px;" align="center"/>
  28.          
  29.               </div>
  30.               <h5 class="tx-color-01 mg-b-40 mg-t-10 tx-center d-none">David Guyon Avocat</h5>
  31.               <div class="form-group">
  32.                 <label>Email</label>
  33.                 <input type="text" name="login" class="form-control" placeholder="Email" required>
  34.               </div>
  35.               <div class="form-group">
  36.                 <div class="d-flex justify-content-between mg-b-5">
  37.                   <label class="mg-b-0-f">Mot de passe</label>
  38.                   <a href="" class="tx-13 d-none">Mot de passe oublié?</a>
  39.                 </div>
  40.                 <input type="password" name="pass"  class="form-control" placeholder="Mot de passe" required>
  41.               </div>
  42.               <div id="msg" class="text-danger"></div>
  43.               
  44.               <input type="hidden" name="captcha" id="captcha" value="">
  45.               <input type="submit" name="connexion" class="btn btn-block btn-primary" value="Se connecter">
  46.               
  47.             </div>
  48.           </div><!-- sign-wrapper -->
  49.           </form>
  50.         </div><!-- media -->
  51.       </div><!-- container -->
  52.     </div><!-- content -->
  53.     
  54.     <script src="{{ asset('lib/jquery/jquery.min.js') }}"></script>
  55.     <script src="{{ asset('lib/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
  56.     <script src="{{ asset('lib/feather-icons/feather.min.js') }}"></script>
  57.     <script src="{{ asset('lib/perfect-scrollbar/perfect-scrollbar.min.js') }}"></script>
  58.     <script src="{{ asset('assets/js/dashforge.js') }}"></script>
  59.     <script src="{{ asset('bundles/fosjsrouting/js/router.min.js') }}"></script>
  60.     <script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"></script>
  61.     <!--<script src="https://www.google.com/recaptcha/api.js?render=6LdZi_YeAAAAAOGuEX435axJzqywzMM-5cx8bWHb"></script>-->
  62.     <!--<script>
  63.     const siteKey = '6LdZi_YeAAAAAOGuEX435axJzqywzMM-5cx8bWHb';
  64.       //either on page load
  65.       grecaptcha.ready(function() {
  66.           grecaptcha.execute(siteKey, {
  67.               action: 'connexion'
  68.           }).then(function(token) {
  69.               //the token will be sent on form submit
  70.               $("#captcha").val(token);
  71.               //keep in mind that token expires in 120 seconds so it's better to add setTimeout.
  72.           });
  73.       });
  74.     
  75.     </script>-->
  76.     <script>
  77.     
  78.     
  79.     $(document).ready(function(){
  80.         
  81.         $("#form_cnx").on("submit",function(e){
  82.             e.preventDefault();
  83.            
  84.             $.ajax({
  85.                 type: "POST",
  86.                 data :  $("#form_cnx").serialize() ,
  87.                 url: Routing.generate('login_user'),
  88.                 success: function(data, statut) {
  89.                   console.log('dddddddddddddddddd',data)
  90.                     if(data == "OK"){
  91.                         window.location.href = Routing.generate('dashboard') ;
  92.                     }
  93.                     else if(data == "double_verif"){
  94.                         window.location.href = Routing.generate('confirm_connexion') ;
  95.                     }
  96.                     else{
  97.                         $("#msg").html(data);
  98.                     }
  99.                     
  100.                 },
  101.                 complete: function(data) {
  102.                     
  103.                     
  104.                     
  105.                 },
  106.                 error: function(resultat, statut, erreur) {
  107.                     $("#msg").html("Problème technique");
  108.                 }
  109.             });
  110.             return false ;
  111.         })
  112.     })
  113.     </script>
  114.     
  115.   </body>
  116. </html>