<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Meta -->
<meta name="description" content="Click'n Requête - Défendre vos libertés fondamentales">
<meta name="author" content="Syntexta.fr">
<title>Admin-Mitih</title>
<!-- vendor css -->
<link href="{{ asset('lib/@fortawesome/fontawesome-free/css/all.min.css') }}" rel="stylesheet">
<link href="{{ asset('lib/ionicons/css/ionicons.min.css') }}" rel="stylesheet">
<!-- DashForge CSS -->
<link rel="stylesheet" href="{{ asset('assets/css/dashforge.css') }}">
<link rel="stylesheet" href="{{ asset('assets/css/dashforge.auth.css') }}">
</head>
<body>
<div class="content content-fixed content-auth">
<div class="container">
<div class="media align-items-stretch justify-content-center ht-100p pos-relative">
<form id="form_cnx" method="post">
<div class="sign-wrapper">
<div class="wd-100p">
<div class="mx-wd-100p text-center">
<img class="img-fluid" alt="" src="https://mitih-admin.synexta-developpement.fr/uploads/logo/logo.png" style="width: 200px;" align="center"/>
</div>
<h5 class="tx-color-01 mg-b-40 mg-t-10 tx-center d-none">David Guyon Avocat</h5>
<div class="form-group">
<label>Email</label>
<input type="text" name="login" class="form-control" placeholder="Email" required>
</div>
<div class="form-group">
<div class="d-flex justify-content-between mg-b-5">
<label class="mg-b-0-f">Mot de passe</label>
<a href="" class="tx-13 d-none">Mot de passe oublié?</a>
</div>
<input type="password" name="pass" class="form-control" placeholder="Mot de passe" required>
</div>
<div id="msg" class="text-danger"></div>
<input type="hidden" name="captcha" id="captcha" value="">
<input type="submit" name="connexion" class="btn btn-block btn-primary" value="Se connecter">
</div>
</div><!-- sign-wrapper -->
</form>
</div><!-- media -->
</div><!-- container -->
</div><!-- content -->
<script src="{{ asset('lib/jquery/jquery.min.js') }}"></script>
<script src="{{ asset('lib/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
<script src="{{ asset('lib/feather-icons/feather.min.js') }}"></script>
<script src="{{ asset('lib/perfect-scrollbar/perfect-scrollbar.min.js') }}"></script>
<script src="{{ asset('assets/js/dashforge.js') }}"></script>
<script src="{{ asset('bundles/fosjsrouting/js/router.min.js') }}"></script>
<script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"></script>
<!--<script src="https://www.google.com/recaptcha/api.js?render=6LdZi_YeAAAAAOGuEX435axJzqywzMM-5cx8bWHb"></script>-->
<!--<script>
const siteKey = '6LdZi_YeAAAAAOGuEX435axJzqywzMM-5cx8bWHb';
//either on page load
grecaptcha.ready(function() {
grecaptcha.execute(siteKey, {
action: 'connexion'
}).then(function(token) {
//the token will be sent on form submit
$("#captcha").val(token);
//keep in mind that token expires in 120 seconds so it's better to add setTimeout.
});
});
</script>-->
<script>
$(document).ready(function(){
$("#form_cnx").on("submit",function(e){
e.preventDefault();
$.ajax({
type: "POST",
data : $("#form_cnx").serialize() ,
url: Routing.generate('login_user'),
success: function(data, statut) {
console.log('dddddddddddddddddd',data)
if(data == "OK"){
window.location.href = Routing.generate('dashboard') ;
}
else if(data == "double_verif"){
window.location.href = Routing.generate('confirm_connexion') ;
}
else{
$("#msg").html(data);
}
},
complete: function(data) {
},
error: function(resultat, statut, erreur) {
$("#msg").html("Problème technique");
}
});
return false ;
})
})
</script>
</body>
</html>