change button

This commit is contained in:
Valentin CZERYBA 2023-10-31 17:06:30 +01:00
parent 64762778d0
commit 6b752e9b2f
2 changed files with 5 additions and 3 deletions

View File

@ -176,7 +176,7 @@
<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><button type="button" class="btn btn-primary" data-bs-toggle="modal" 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>
</tbody>

View File

@ -120,9 +120,11 @@ instance.get("users", {withCredentials: true, params:param}).then(function(respo
}
td[5].querySelector(".activeStatus").classList.add("hidden");
td[5].querySelector(classTd).classList.remove("hidden");
td[6].querySelector("button").setAttribute("userid", listData[i].id)
trAll[i].addEventListener("click", function(e){
var id = e.currentTarget.querySelectorAll("td")[1].textContent;
td[6].querySelector("button").addEventListener("click", function(e){
var id = e.currentTarget.getAttribute("userid");
location.href="/html/user.html?id="+id;
});