adduser message

This commit is contained in:
Valentin CZERYBA 2022-08-15 17:43:30 +02:00
parent a34f05a300
commit 14fdc8e10c
2 changed files with 5 additions and 1 deletions

View File

@ -124,7 +124,7 @@
</div>
<div class="alert alert-success alert-dismissible hidden" id="createUserAlert" role="alert">
<div>Vous avez créer un utilisateur</div>
<div>Vous avez créer l'utilisateur <span id="displayUser"></span></div>
<button type="button" class="btn-close" aria-label="Close"></button>
</div>

View File

@ -51,6 +51,10 @@ document.getElementById("addUser").addEventListener("click", function(){
switch(response.status){
case 201:
idAlert="createUser"
var user = document.getElementById("pseudoUpdateInput").value;
if(user.length > 0){
document.getElementById("displayUser").textContent=user;
}
break;
case 204:
idAlert="notModified"