add user success

This commit is contained in:
Valentin CZERYBA 2022-08-14 19:36:23 +02:00
parent b9aefc1dcd
commit a34f05a300
2 changed files with 6 additions and 1 deletions

View File

@ -123,6 +123,11 @@
<button type="button" class="btn-close" aria-label="Close"></button> <button type="button" class="btn-close" aria-label="Close"></button>
</div> </div>
<div class="alert alert-success alert-dismissible hidden" id="createUserAlert" role="alert">
<div>Vous avez créer un utilisateur</div>
<button type="button" class="btn-close" aria-label="Close"></button>
</div>
<div class="alert alert-warning alert-dismissible hidden" id="pseudoExistAlert" role="alert"> <div class="alert alert-warning alert-dismissible hidden" id="pseudoExistAlert" role="alert">
<div>Pseudo déjà pris</div> <div>Pseudo déjà pris</div>
<button type="button" class="btn-close" aria-label="Close"></button> <button type="button" class="btn-close" aria-label="Close"></button>

View File

@ -50,7 +50,7 @@ document.getElementById("addUser").addEventListener("click", function(){
var idAlert = ""; var idAlert = "";
switch(response.status){ switch(response.status){
case 201: case 201:
location.reload(); idAlert="createUser"
break; break;
case 204: case 204:
idAlert="notModified" idAlert="notModified"