Fix bug with invites in webui, add profile selector

invite codes starting with a digit don't work with the webui, so
GenerateInvite regenerates uuids until theres one that doesn't.
This commit is contained in:
Harvey Tindall
2020-09-22 00:34:11 +01:00
parent 32b8ed4aa2
commit b6ceee508c
5 changed files with 53 additions and 12 deletions
+5 -4
View File
@@ -22,11 +22,12 @@ function serializeForm(id: string): Object {
break;
case "select-one":
case "select":
let val: string | number = (el as HTMLSelectElement).value;
if (+val != NaN) {
val = +val;
let val: string = (el as HTMLSelectElement).value.toString();
if (!isNaN(val as any)) {
formData[name] = +val;
} else {
formData[name] = val;
}
formData[name] = val;
break;
}
}