Correction modification profil employé
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Organisation/sirh/pipeline/pr-main There was a failure building this commit

This commit is contained in:
2026-06-18 10:39:07 +00:00
parent 415860f233
commit a28b177eba
2 changed files with 5 additions and 2 deletions

View File

@@ -24,7 +24,6 @@ enregistrerProfil.addEventListener("click", (e) => {
const csrftoken = document.querySelector("[name='csrfmiddlewaretoken']").value;
const formData = new FormData();
formData.append("nom", $("nom").value);
formData.append("prenom", $("prenom").value);
formData.append("email", $("email").value);
@@ -32,6 +31,10 @@ enregistrerProfil.addEventListener("click", (e) => {
formData.append("adresse", $("adresse").value);
formData.append("sexe", $("sexe").value);
formData.append("date_naissance", $("date_naissance").value);
const photoInput = $("photo");
if (photoInput.files.length > 0) {
formData.append("photo", photoInput.files[0]);
}
fetch(url, {
method: "POST",