Compare commits

...

3 commits

Author SHA1 Message Date
240a07e6d8 Setze leere Defaultoptionen 2023-11-10 14:12:45 +01:00
3f2b312870 Update sqlite3 2023-11-10 14:10:47 +01:00
a3ccb136f0 Neue Veranstaltung 2023-11-10 14:07:45 +01:00
5 changed files with 9 additions and 5 deletions

View file

@ -77,6 +77,7 @@ INSERT INTO `course` (name) VALUES
('Numerik gewöhnlicher Differentialgleichungen'),
('Numerische Lineare Algebra'),
('Numerische Mathe für MB (IV)'),
('Parabolische PDEs'),
('Partial Differential Equations I'),
('Probability Theory'),
('Riemannsche Flächen'),

2
go.mod
View file

@ -2,6 +2,6 @@ module officeHours
go 1.18
require github.com/mattn/go-sqlite3 v1.14.17
require github.com/mattn/go-sqlite3 v1.14.18
require github.com/go-sql-driver/mysql v1.7.1

4
go.sum
View file

@ -1,4 +1,4 @@
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM=
github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI=
github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=

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}}