<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>
{% block title %}
IAA E-learning - DOYEN DES INSTITUTS DE FORMATION EN ASSURANCE
{% endblock %}
</title>
<!-- Titre (70 caractères max) -->
<!-- Description (150-160 caractères) -->
<meta name="description" content="Le cycle de formation en assurance de l’IAA est approuvé par les instances de contrôle et est reconnu pour compléter le dossier d’agrément pour l’exercice du métier d’agent général en Tunisie.">
<!-- Indexation par Google -->
<meta name="robots" content="index, follow">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="{{ asset('assets/site/css/style.css') }}">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<div class="formation">
{{ include("site/header.html.twig") }}
{% block page %}
{% endblock %}
{{ include("site/footer.html.twig") }}
</div>
<script>
$('#imgavatar').change(function () {
console.log("userPhoto")
var form = document.getElementById('imgavatar').files[0]
console.log($(this).data('userid'))
var formData = new FormData()
formData.append('photoDeProfilFile', form)
var url = "{{ path('app_modifier_photo_de_profil', {'id':'mon_id'}) }}"
url = url = url.replace('mon_id', $(this).data('userid'))
$.ajax({
url: url,
method: 'POST',
data: formData,
contentType: false,
processData: false,
cache: false,
dataType: 'json',
success: function (r) {
console.log(r)
}
})
})
$('#updateProfil').click(function () {
var url = "{{ path('app_user_editprofil') }}"
$.post(url,
{
civilite: $("#civilite").val(),
nom: $("#nom").val(),
prenom: $("#prenom").val(),
email: $("#email").val(),
tel: $("#tel").val(),
adresse: $("#adresse").val(),
codePostal: $("#codePostal").val(),
ville: $("#ville").val(),
},
function(data, status){
location.reload();
});
})
$('#showform').click(function () {
console.log('dssss')
$(".editform").show()
$(".details-client").hide()
});
$('.inscrire').click(function () {
$("#inscription").show()
$("#login").hide()
});
$('.login').click(function () {
$("#login").show()
$("#inscription").hide()
});
$('#btnformcontact').click(function () {
var envoi = 1
if($("#nom").val() == ""){
envoi = 0;
$("#nom").css("border", "1px solid red")
}
if($("#telephone").val() == ""){
envoi = 0;
$("#telephone").css("border", "1px solid red")
}
if(envoi == 1){
var url = "{{ path('envoi_mail_contact_site') }}"
$.post(url,
{
nom: $("#nom").val(),
sujet: $("#sujet").val(),
email: $("#email").val(),
telephone: $("#telephone").val(),
message: $("#message").val(),
},
function(data, status){
location.reload();
});
}
});
</script>
</body>
</html>