feat(verif): add a confirm dialog for tocards #3
@@ -70,6 +70,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.getElementById("person").addEventListener("change", (event) => {
|
document.getElementById("person").addEventListener("change", (event) => {
|
||||||
|
if (
|
||||||
|
window.confirm(
|
||||||
|
`Vérification! Tu es ${event.target.value}, c'est bien ça?`
|
||||||
|
)
|
||||||
|
) {
|
||||||
const options = {
|
const options = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
@@ -86,6 +91,7 @@
|
|||||||
).textContent = `Hoho! Tu as pioché ${text} ;`;
|
).textContent = `Hoho! Tu as pioché ${text} ;`;
|
||||||
document.getElementById("person").remove();
|
document.getElementById("person").remove();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user