Setze leere Defaultoptionen

This commit is contained in:
Gonne 2023-11-10 14:12:45 +01:00
parent 3f2b312870
commit 240a07e6d8
2 changed files with 5 additions and 2 deletions

View file

@ -35,6 +35,7 @@
<div class="form-floating mb-3">
<select class="form-control form-select required" required name="veranstaltung" id="veranstaltung">
<option disabled selected value> auswählen </option>
{{range $course := .Courses}}
<option value="{{$course.Id}}"{{if eq $course.Id $.SelectedCourse}} selected{{end}}>{{$course.Name}}</option>
{{end}}
@ -63,6 +64,7 @@
<div class="form-floating mb-3">
<select class="form-control form-select required" required name="tag" id="tag">
<option disabled selected value> auswählen </option>
<option value="0"{{if eq 0 $.Date.Day}} selected{{end}}>Montag</option>
<option value="1"{{if eq 1 $.Date.Day}} selected{{end}}>Dienstag</option>
<option value="2"{{if eq 2 $.Date.Day}} selected{{end}}>Mittwoch</option>
@ -102,6 +104,7 @@
<div class="form-floating mb-3">
<select class="form-control form-select required" required name="raum" id="raum">
<option disabled selected value> auswählen </option>
{{range $room := .Rooms}}
<option value="{{$room.Id}}"{{if eq $room.Id $.SelectedRoom}} selected{{end}}>{{$room.Name}}</option>
{{end}}

View file

@ -14,7 +14,7 @@ Sprechstunden
<div class="input-group mb-3">
<div class="form-floating col-lg-8">
<select class="form-control form-select" name="veranstaltung" id="veranstaltung" size="1" onchange="document.forms[0].submit()">
<option value=""> auswählen </option>
<option disabled selected value> auswählen </option>
{{range $course := .Courses}}
<option value="{{$course.Id}}"{{if eq $course.Id $.SelectedCourse}} selected{{end}}>{{$course.Name}}</option>
{{end}}
@ -30,7 +30,7 @@ Sprechstunden
<div class="input-group mb-3">
<div class="form-floating">
<select class="form-control form-select" name="raum" id="raum" size="1" onchange="document.forms[1].submit()">
<option value=""> auswählen </option>
<option disabled selected value> auswählen </option>
{{range $room := .Rooms}}
<option value="{{$room.Id}}"{{if eq $room.Id $.SelectedRoom}} selected{{end}}>{{$room.Name}}</option>
{{end}}