Support additional logos, starting with THW

This commit is contained in:
2024-09-25 01:29:15 +02:00
parent 88d5455296
commit 65b9c44579
3 changed files with 2195 additions and 3 deletions

View File

@ -26,6 +26,7 @@
data() {
return {
name: "",
logo: "fablab",
fetching: false,
error: false,
}
@ -50,6 +51,7 @@
method: "post",
body: JSON.stringify({
"name": this.name,
"logo": this.logo,
}),
headers: {
"Content-Type": "application/json",
@ -87,6 +89,10 @@
<form ref="form" action="{{ url_for('generate') }}" method="post">
<label for="name">Name:</label>
<input type="text" id="name" name="name" style="text-align: center;" placeholder="Name" v-model="name" :disabled="fetching" :aria-invalid="name === ''">
<select id="logo" name="logo" v-model="logo" :disabled="fetching" aria-label="Logo auswählen" required>
<option value="fablab">FabLab</option>
<option value="thw">THW</option>
</select>
<button v-if="!fetching" ref="submitButton" type="submit" @click="generate" :disabled="name === ''">Generieren</button>
<button v-if="fetching" style="display: none" v-show="true" type="button" disabled="true" aria-busy="true">Generiere...</button>
</form>