change button
This commit is contained in:
parent
64762778d0
commit
6b752e9b2f
@ -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>
|
||||
|
@ -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;
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user