forked from v4l3n71n/covas-bo
add name
This commit is contained in:
parent
ed6d7dc4f1
commit
48c7e38c87
@ -171,9 +171,10 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th><input type="checkbox" id="checkboxPrincipal" aria-label="Checkbox for following text input"></th>
|
<th><input type="checkbox" id="checkboxPrincipal" aria-label="Checkbox for following text input"></th>
|
||||||
<th scope="col">ID</th>
|
<th scope="col">ID</th>
|
||||||
<th scope="col">Username</th>
|
<th scope="col">Nom</th>
|
||||||
<th scope="col">Mail</th>
|
<th scope="col">Lieu</th>
|
||||||
<th scope="col">Rôle</th>
|
<th scope="col">Date de début</th>
|
||||||
|
<th scope="col">Date de fin</th>
|
||||||
<th scope="col">Statut</th>
|
<th scope="col">Statut</th>
|
||||||
<th scope="col"></th>
|
<th scope="col"></th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -185,6 +186,7 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
|
<td></td>
|
||||||
<td><span class="activeStatus hidden">Activé</span><span class="disableStatus hidden">Désactivé</span><span class="confirmStatus hidden">En attente de confirmation</span><span class="removeStatus hidden">En attente de suppression</span><span class="unknownStatus hidden">Statut inconnu</span></td>
|
<td><span class="activeStatus hidden">Activé</span><span class="disableStatus hidden">Désactivé</span><span class="confirmStatus hidden">En attente de confirmation</span><span class="removeStatus hidden">En attente de suppression</span><span class="unknownStatus hidden">Statut inconnu</span></td>
|
||||||
<td><button type="button" class="btn btn-primary" data-bs-toggle="modal" userid="" data-bs-target="#updateUserModal">Modifier</button></td>
|
<td><button type="button" class="btn btn-primary" data-bs-toggle="modal" userid="" data-bs-target="#updateUserModal">Modifier</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -26,14 +26,13 @@ document.getElementById("addUser").addEventListener("click", function(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
dataPut = {
|
dataPut = {
|
||||||
"username": document.getElementById("usernameUpdateInput").value,
|
"username": document.getElementById("usernameUpdateInput").value,
|
||||||
"email": document.getElementById("emailUpdateInput").value,
|
"email": document.getElementById("emailUpdateInput").value,
|
||||||
"name": document.getElementById("nameUpdateInput").value,
|
"name": document.getElementById("nameUpdateInput").value,
|
||||||
"firstName": document.getElementById("firstNameUpdateInput").value,
|
"firstName": document.getElementById("firstNameUpdateInput").value,
|
||||||
"birth": document.getElementById("birthUpdateInput").value,
|
"birth": document.getElementById("birthUpdateInput").value,
|
||||||
"password": document.getElementById("passwordUpdateInput").value,
|
"password": document.getElementById("passwordUpdateInput").value,
|
||||||
"roles": selector["roles"]
|
"roles": selector["roles"]
|
||||||
|
|
||||||
}
|
}
|
||||||
instance({
|
instance({
|
||||||
method : "put",
|
method : "put",
|
||||||
|
@ -59,11 +59,13 @@ function buildParam(typeInput){
|
|||||||
if(search.length > 0){
|
if(search.length > 0){
|
||||||
if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(search)){
|
if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(search)){
|
||||||
param = param + "email="+search+"&";
|
param = param + "email="+search+"&";
|
||||||
} else {
|
} else if (/^[a-fA-F0-9]{24}$/.test(search)){
|
||||||
param = param + "id="+search+"&";
|
param = param + "id="+search+"&";
|
||||||
}
|
} else {
|
||||||
|
param = param + "name="+search+"&";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
listParam.push("email"); listParam.push("id");
|
listParam.push("email"); listParam.push("id"); listParam.push("name");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i=0; i<listParam.length; i++){
|
for (var i=0; i<listParam.length; i++){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user