ui: style select inputs for timetable

This commit is contained in:
Johannes 2023-07-07 22:11:52 +02:00
parent bfce76ca79
commit 1b99dd8a3c

View file

@ -10,24 +10,38 @@ Sprechstunden
{{define "content"}} {{define "content"}}
<form method="GET" action="/getByCourse"> <form method="GET" action="/getByCourse">
<label for="veranstaltung">Veranstaltung: </label> <div class="input-group mb-3">
<select name="veranstaltung" id="veranstaltung" size="1" onchange="document.forms[0].submit()"> <div class="form-floating col-lg-8">
<option value="">Alle</option> <select class="form-control form-select" name="veranstaltung" id="veranstaltung" size="1" onchange="document.forms[0].submit()">
{{range $course := .Courses}} <option value=""> auswählen </option>
<option value="{{$course.Id}}"{{if eq $course.Id $.SelectedCourse}} selected{{end}}>{{$course.Name}}</option> {{range $course := .Courses}}
{{end}} <option value="{{$course.Id}}"{{if eq $course.Id $.SelectedCourse}} selected{{end}}>{{$course.Name}}</option>
</select> {{end}}
<input type="submit" value="Auswählen"> </select>
<label for="veranstaltung">Veranstaltung</label>
</div>
<noscript>
<button class="btn btn-sm btn-outline-secondary col-lg-4" type="submit">Los!</button>
</noscript>
</div>
</form> </form>
<form method="GET" action="/getByRoom"> <form method="GET" action="/getByRoom">
<label for="raum">Raum: </label> <div class="input-group mb-3">
<select name="raum" id="raum" size="1" onchange="document.forms[1].submit()"> <div class="form-floating">
<option value="">Alle</option> <select class="form-control form-select" name="raum" id="raum" size="1" onchange="document.forms[1].submit()">
{{range $room := .Rooms}} <option value=""> auswählen </option>
<option value="{{$room.Id}}"{{if eq $room.Id $.SelectedRoom}} selected{{end}}>{{$room.Name}}</option> {{range $room := .Rooms}}
{{end}} <option value="{{$room.Id}}"{{if eq $room.Id $.SelectedRoom}} selected{{end}}>{{$room.Name}}</option>
</select> {{end}}
<input type="submit" value="Auswählen"> </select>
<label for="raum">Raum</label>
</div>
<noscript>
<button class="btn btn-outline-secondary col-lg-4" type="submit">Los!</button>
</noscript>
</div>
</form> </form>
{{.Timetable}} <div id="timetable" style="overflow-x: scroll;">
{{.Timetable}}
</div>
{{end}} {{end}}