add backoffice

This commit is contained in:
Valentin CZERYBA 2023-11-03 21:36:53 +01:00
parent 689cd27e73
commit e485acb062
2 changed files with 4 additions and 5 deletions

View File

@ -119,12 +119,12 @@
<main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
<div class="alert alert-warning alert-dismissible hidden" id="notModifiedAlert" role="alert">
<div>Utilisateur non modifié</div>
<div>Utilisateur non ajouté, car le pseudo ou l'adresse mail existe déjà</div>
<button type="button" class="btn-close" aria-label="Close"></button>
</div>
<div class="alert alert-success alert-dismissible hidden" id="createUserAlert" role="alert">
<div>Vous avez créer l'utilisateur <span id="displayUser"></span></div>
<div>Vous avez créée l'utilisateur <span id="displayUser"></span></div>
<button type="button" class="btn-close" aria-label="Close"></button>
</div>

View File

@ -122,8 +122,7 @@ if(id.length > 0){
}
dataPut = {
"id": id,
"id": document.getElementById("idUpdateInput").value,
"username": document.getElementById("usernameUpdateInput").value,
"email": document.getElementById("emailUpdateInput").value,
"name": document.getElementById("nameUpdateInput").value,
@ -140,7 +139,7 @@ if(id.length > 0){
}
instance({
method : "put",
url:"users",
url:"users/"+document.getElementById("idUpdateInput").value,
withCredentials: true,
data: dataPut
}).then(function(response){