add select menu

This commit is contained in:
Valentin CZERYBA 2022-08-15 23:41:10 +02:00
parent cc3663f1a5
commit 658b5474a2
2 changed files with 28 additions and 1 deletions

View File

@ -101,6 +101,8 @@
<div class="container-fluid">
<div class="row">
<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
<div class="position-sticky pt-3 sidebar-sticky">
<ul class="nav flex-column">
@ -133,6 +135,27 @@
<h2>Liste d'utilisateur</h2>
<div class="table-responsive">
<div class="row g-3">
<div class="col-auto">
<label for="inputRoles" class="form-label">Roles</label>
<select class="form-select" id="inputRoles" aria-label="Default select example">
<option value="All" selected>Tout</option>
<option value="Admin">Administrateurs</option>
<option value="User">Utilisateurs</option>
</select>
</div>
<div class="col-auto">
<label for="inputStatus" class="form-label">Statut</label>
<select class="form-select" id="inputStatus" aria-label="Default select example">
<option value="-2" selected>Tout</option>
<option value="-1">En cours de suppression</option>
<option value="0">Desactivé</option>
<option value="1">Activé</option>
<option value="2">En cours de validation</option>
</select>
</div>
</div>
<table id=users class="table table-striped table-sm">
<thead>
<tr>

View File

@ -104,7 +104,11 @@ document.getElementById("searchUser").addEventListener("keydown", function(ev){
if(ev.key === "Enter"){
var search = document.getElementById("searchUser").value;
if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(search)){
alert(search);
alert("mail");
} else if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(search)){
alert("uuid");
} else {
alert("other");
}
}
})