Fonctionnalite: Ajout des contrats

This commit is contained in:
2026-04-30 13:28:53 +02:00
parent 9d9e6c6549
commit c0cdca48fa
259 changed files with 325 additions and 43442 deletions

View File

@@ -1,23 +0,0 @@
const btnEnregistrerBailleur = document.getElementById('btnEnregistrerBailleur');
btnEnregistrerBailleur.addEventListener('click', function() {
const form = document.getElementById('formBailleur');
const formData = new FormData(form);
fetch(form.action, {
method: 'POST',
body: formData,
headers: {
'X-CSRFToken': formData.get('csrfmiddlewaretoken')
}
})
.then(response => response.json())
.then(data => {
if (data.success) {
alert('Bailleur enregistré avec succès !');
window.location.reload();
} else {
alert('Ce bailleur existe déjà dans la base de données.');
}
});
});