Ajout de la prise en charge des photos de profil
This commit is contained in:
@@ -16,6 +16,7 @@ const tableau_certificat = new Tabulator("#tableau-certificat", {
|
||||
],
|
||||
ajaxURL: url_certificat,
|
||||
})
|
||||
<<<<<<< HEAD
|
||||
const enregistrerProfil = $("enregistrerProfil");
|
||||
|
||||
enregistrerProfil.addEventListener("click", (e) => {
|
||||
@@ -43,4 +44,30 @@ enregistrerProfil.addEventListener("click", (e) => {
|
||||
.then(response => response.json())
|
||||
.then(data => alert(data.message))
|
||||
.catch(error => console.error("Erreur:", error));
|
||||
});
|
||||
});
|
||||
=======
|
||||
|
||||
const enregistrerProfil = $("enregistrerProfil");
|
||||
enregistrerProfil.addEventListener("click", (e) => {
|
||||
const url = $("information-personnelles").dataset.url;
|
||||
const csrftoken = document.querySelector("[name='csrfmiddlewaretoken']").value;
|
||||
fetch(url, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': csrftoken
|
||||
},
|
||||
body: JSON.stringify({
|
||||
"nom": $("nom").value,
|
||||
"prenom": $("prenom").value,
|
||||
"email": $("email").value,
|
||||
"telephone": $("telephone").value,
|
||||
"adresse": $("adresse").value,
|
||||
"sexe": $("sexe").value,
|
||||
"date_naissance": $("date_naissance").value,
|
||||
})
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => alert(data.message))
|
||||
})
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
|
||||
Reference in New Issue
Block a user