feat(verif): add a confirm dialog for tocards

This commit is contained in:
qdegrandmaison
2022-11-30 16:08:41 +01:00
committed by inso
parent 10c1ba6f04
commit d7564300e8

View File

@@ -17,6 +17,7 @@
__OPTIONS__
</select>
<div id="confirmation"></div>
<h2 id="result"></h2>
<!-- Christmas tree -->
@@ -70,6 +71,11 @@
<script>
document.getElementById("person").addEventListener("change", (event) => {
if (
window.confirm(
`Vérification! Tu es ${event.target.value}, c'est bien ça?`
)
) {
const options = {
method: "POST",
headers: { "Content-Type": "application/json" },
@@ -86,6 +92,7 @@
).textContent = `Hoho! Tu as pioché ${text} ;`;
document.getElementById("person").remove();
});
}
});
</script>
</body>