update page addevents

This commit is contained in:
Valentin CZERYBA 2023-11-10 23:50:41 +01:00
parent 83321404ab
commit 5d70b58fa7
2 changed files with 10 additions and 32 deletions

View File

@ -173,49 +173,29 @@
<h1 class="h2">Évènement</h1>
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="usernameUpdate">Pseudo</span>
<input id="usernameUpdateInput" type="text" class="form-control" placeholder="Pseudo" aria-label="Pseudo" aria-describedby="usernameUpdate">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="passwordUpdate">Mot de passe</span>
<input id="passwordUpdateInput" type="password" class="form-control" placeholder="Mot de passe" aria-label="Mot de passe" aria-describedby="passwordUpdate">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="nameUpdate">Nom</span>
<input id="nameUpdateInput" type="text" class="form-control" placeholder="Nom" aria-label="Nom" aria-describedby="nameUpdate">
<input id="nameUpdateInput" type="text" class="form-control" placeholder="Nom" aria-label="Pseudo" aria-describedby="nameUpdate">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="firstNameUpdate">Prenom</span>
<input id="firstNameUpdateInput" type="text" class="form-control" placeholder="Prenom" aria-label="Prenom" aria-describedby="firstNameUpdate">
<span class="input-group-text" id="placeUpdate">Lieu</span>
<input id="placeUpdateInput" type="text" class="form-control" placeholder="Lieu" aria-label="Lieu" aria-describedby="placeUpdate">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="emailUpdate">Email</span>
<input id="emailUpdateInput" type="text" class="form-control" placeholder="Email" aria-label="Email" aria-describedby="emailUpdate">
<span class="input-group-text" id="start_dateUpdate">Date de début de l'évènement</span>
<input id="start_dateUpdateInput" type="datetime-local" class="form-control" placeholder="Date de début de l'évènement" aria-label="Date de début de l'évènement" aria-describedby="start_dateUpdate">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="birthUpdate">Date de naissance</span>
<input id="birthUpdateInput" type="date" class="form-control" placeholder="Date de naissance" aria-label="Date de naissance" aria-describedby="birthdateUpdate">
</div>
<div class="input-group mb-3">
<label class="input-group-text" for="rolesSelector">Roles</label>
<select class="form-select" id="rolesSelector">
<option value="Admin">Administrateur</option>
<option value="User" selected>Utilisateur</option>
</select>
<span class="input-group-text" id="end_dateUpdate">Date de fin de l'évènement</span>
<input id="end_dateUpdateInput" type="datetime-local" class="form-control" placeholder="Date de fin de l'évènement" aria-label="Date de fin de l'évènement" aria-describedby="end_dateUpdate">
</div>
<div class="d-grid gap-2 col-6 mx-auto">
<button type="button" class="btn btn-success" id="addUser">Ajouter l'utilisateur</button>
<button type="button" class="btn btn-success" id="addUser">Ajouter l'évènement</button>
</div>

View File

@ -216,11 +216,9 @@ document.getElementById("searchUser").addEventListener("keydown", function(ev){
}
});
listInput = ["Status", "Pages" ]
if (pathURL=="users"){
listInput = ["Status", "Roles", "Pages" ]
}
if (pathURL=="events"){
listInput = ["Status", "Pages" ]
listInput.append("Roles")
}
for (var i=0; i<listInput.length; i++){