small fixes (if player not exsits show ?)
This commit is contained in:
@@ -76,6 +76,10 @@ async function main() {
|
||||
}
|
||||
if (select.value === "other") {
|
||||
let otherInput = document.getElementById("other");
|
||||
if (otherInput.value === "") {
|
||||
showMessage("Tu as sélectionné autre mais tu n'as pas donné de nom", "N'oublie pas de soit sélectioner une personne ou de mettre un nom dans ''Autre:''.", true, "warning");
|
||||
return;
|
||||
}
|
||||
let otherInputLabel = document.getElementById("other_label");
|
||||
let player = await fetch("/player", {method: "post", body: JSON.stringify({"name": otherInput.value})}).then(r => r.json());
|
||||
let option = document.createElement("option");
|
||||
@@ -106,6 +110,10 @@ async function main() {
|
||||
title.textContent = "Vote -";
|
||||
if (select.value === "other") {
|
||||
let otherInput = document.getElementById("other");
|
||||
if (otherInput.value === "") {
|
||||
showMessage("Tu as sélectionné autre mais tu n'as pas donné de nom", "N'oublie pas de soit sélectioner une personne ou de mettre un nom dans ''Autre:''.", true, "warning");
|
||||
return;
|
||||
}
|
||||
let otherInputLabel = document.getElementById("other_label");
|
||||
let player = await fetch("/player", {method: "post", body: JSON.stringify({"name": otherInput.value})}).then(r => r.json());
|
||||
let option = document.createElement("option");
|
||||
|
||||
Reference in New Issue
Block a user