diff options
author | Marvin Borner | 2020-10-12 17:30:16 +0200 |
---|---|---|
committer | Marvin Borner | 2020-10-12 17:30:16 +0200 |
commit | e8db49605aab15d80df126530a4a3acfeaa7082f (patch) | |
tree | f067a409967e1a74b8af2e509a6cc9dde00fa866 /quotes | |
parent | 8bda74d50029c181d35bf13d12252ff4d4592042 (diff) |
Fixed chrom{e,ium} disabled select submissions
Diffstat (limited to 'quotes')
-rw-r--r-- | quotes/public/script.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/quotes/public/script.js b/quotes/public/script.js index d848814..4c19953 100644 --- a/quotes/public/script.js +++ b/quotes/public/script.js @@ -1,15 +1,18 @@ const dropdown = document.getElementById("author"); const classes = ["TGM13.1", "TGM13.2", "TGTM13.1", "TGI13.1", "TGI13.2", "teacher"]; -dropdown.insertAdjacentHTML("beforeend", '<option selected="true" disabled>Author auswählen...</option>'); -dropdown.insertAdjacentHTML("beforeend", `<option disabled>--${classes[0]}--</option>`); +dropdown.insertAdjacentHTML( + "beforeend", + '<option disabled value="" selected="true" disabled>Author auswählen...</option>', +); +dropdown.insertAdjacentHTML("beforeend", `<option disabled value="">--${classes[0]}--</option>`); function appendOption(response) { response.forEach((elem, i) => { dropdown.insertAdjacentHTML( "beforeend", (response[i - 1 < 0 ? 0 : i - 1]["class_id"] !== elem["class_id"] - ? `<option disabled>--${classes[elem["class_id"] - 1]}--</option>` + ? `<option disabled value="">--${classes[elem["class_id"] - 1]}--</option>` : "") + `<option value="${elem["id"]}">${elem["name"]} ${elem["middlename"] ? elem["middlename"] + " " : ""}${ elem["surname"] |