Commit 3d711406 authored by Théo GUILLON's avatar Théo GUILLON
Browse files

Correction : reset des champs lors de l'enregistrement pour le co-responsable et le sous-traitant

parent 146d8910
......@@ -74,10 +74,18 @@
telephoneportable_dpo: $('#modalAddResponsableInFiche #telephoneportable_dpo').val(),
};
console.log(dataResponsable);
sendNewResponsable(dataResponsable);
});
$('#modalAddResponsableInFiche').on('hidden.bs.modal', function (e) {
$(this)
.find("input, textarea, select")
.val('')
.end()
.find("input[type=checkbox], input[type=radio]")
.prop("checked", "")
.end();
})
});
function sendNewResponsable(data)
......@@ -92,7 +100,6 @@
success: function(dataResponse, textStatus, xhr) {
try {
if (xhr.status === 201) {
$('form')[0].reset();
$('#modalAddResponsableInFiche').modal('toggle');
updateListingResponsable(dataResponse['id']);
......
......@@ -74,10 +74,18 @@
telephoneportable_dpo: $('#modalAddSoustraitantInTraitement #telephoneportable_dpo').val(),
};
console.log(dataSoustraitant);
sendNewSoustraitant(dataSoustraitant);
});
$('#modalAddSoustraitantInTraitement').on('hidden.bs.modal', function (e) {
$(this)
.find("input, textarea, select")
.val('')
.end()
.find("input[type=checkbox], input[type=radio]")
.prop("checked", "")
.end();
})
});
function sendNewSoustraitant(data)
......@@ -92,7 +100,6 @@
success: function(dataResponse, textStatus, xhr) {
try {
if (xhr.status === 201) {
$('form')[0].reset();
$('#modalAddSoustraitantInTraitement').modal('toggle');
updateListingSoustraitant(dataResponse['id']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment