style addMask form
This commit is contained in:
parent
7d02374511
commit
f835616697
1 changed files with 117 additions and 42 deletions
|
@ -1,57 +1,132 @@
|
||||||
<{{define "title"}}Sprechstunde anlegen{{end}}
|
{{define "title"}}Sprechstunde anlegen{{end}}
|
||||||
|
|
||||||
{{define "content"}}
|
{{define "content"}}
|
||||||
|
|
||||||
|
<div class="alert alert-info">
|
||||||
|
Für die vorlesungsfreie Zeit müssen und können keine Sprechstunden gebucht werden.
|
||||||
|
Nutzt die offenen Arbeitsräume in dieser Zeit, wann immer ihr sie braucht.
|
||||||
|
</div>
|
||||||
{{range .Errors}}
|
{{range .Errors}}
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
<strong>Fehler: </strong> {{.}}
|
<strong>Fehler: </strong> {{.}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<p>
|
<style>
|
||||||
Für die vorlesungsfreie Zeit müssen und können keine Sprechstunden gebucht werden.
|
input.required ~ label::after, select.required ~ label::after {
|
||||||
Nutzt die offenen Arbeitsräume in dieser Zeit, wann immer ihr sie braucht.
|
content: ' *';
|
||||||
</p>
|
color: red;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<form method="POST" action="addOfficeHour">
|
<form method="POST" action="addOfficeHour">
|
||||||
<label for="veranstaltung">Veranstaltung</label>:
|
<div class="form-floating mb-3">
|
||||||
<select name="veranstaltung" id="veranstaltung">
|
<select class="form-control form-select required" required name="veranstaltung" id="veranstaltung">
|
||||||
{{range $course := .Courses}}
|
{{range $course := .Courses}}
|
||||||
<option value="{{$course.Id}}"{{if eq $course.Id $.SelectedCourse}} selected{{end}}>{{$course.Name}}</option>
|
<option value="{{$course.Id}}"{{if eq $course.Id $.SelectedCourse}} selected{{end}}>{{$course.Name}}</option>
|
||||||
{{end}}
|
{{end}}
|
||||||
</select><br>
|
</select>
|
||||||
<small><span class="text-muted">Wenn du eine Veranstaltung hier vermisst, schreibe an
|
<label for="veranstaltung">Veranstaltung</label>
|
||||||
<a href="mailto:sprechstundentool@mathebau.de?subject=Sprechstundentool: Neue Veranstaltung&body=Hey liebe Sprechstundentool-Admins,%0D%0A%0D%0Ameine Veranstaltung fehlt im Auswahlmenü.%0D%0AEs ist die Veranstaltung%0D%0A%0D%0AViele Grüße%0D%0A">sprechstundentool@mathebau.de</a>.</span></small><br>
|
<div class="form-text">
|
||||||
<label for="woche">Vorlesungswoche</label>:
|
Wenn du eine Veranstaltung hier vermisst, schreibe an
|
||||||
<select name="woche" id="woche">
|
<a href="mailto:sprechstundentool@mathebau.de?subject=Sprechstundentool: Neue Veranstaltung&body=Hey liebe Sprechstundentool-Admins,%0D%0A%0D%0Ameine Veranstaltung fehlt im Auswahlmenü.%0D%0AEs ist die Veranstaltung%0D%0A%0D%0AViele Grüße%0D%0A" tabindex="-1">sprechstundentool@mathebau.de</a>.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<select class="form-select required" required name="woche" id="woche">
|
||||||
<option value="0"{{if eq 0 $.Date.Week}} selected{{end}}>Jede</option>
|
<option value="0"{{if eq 0 $.Date.Week}} selected{{end}}>Jede</option>
|
||||||
<option value="1"{{if eq 1 $.Date.Week}} selected{{end}}>Ungerade</option>
|
<option value="1"{{if eq 1 $.Date.Week}} selected{{end}}>Ungerade</option>
|
||||||
<option value="2"{{if eq 2 $.Date.Week}} selected{{end}}>Gerade</option>
|
<option value="2"{{if eq 2 $.Date.Week}} selected{{end}}>Gerade</option>
|
||||||
</select><br>
|
</select>
|
||||||
<label for="tag">Tag</label>: <select name="tag" id="tag">
|
<label for="woche">Vorlesungswoche</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<select class="form-select required" required name="tag" id="tag">
|
||||||
<option value="0"{{if eq 0 $.Date.Day}} selected{{end}}>Montag</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="1"{{if eq 1 $.Date.Day}} selected{{end}}>Dienstag</option>
|
||||||
<option value="2"{{if eq 2 $.Date.Day}} selected{{end}}>Mittwoch</option>
|
<option value="2"{{if eq 2 $.Date.Day}} selected{{end}}>Mittwoch</option>
|
||||||
<option value="3"{{if eq 3 $.Date.Day}} selected{{end}}>Donnerstag</option>
|
<option value="3"{{if eq 3 $.Date.Day}} selected{{end}}>Donnerstag</option>
|
||||||
<option value="4"{{if eq 4 $.Date.Day}} selected{{end}}>Freitag</option>
|
<option value="4"{{if eq 4 $.Date.Day}} selected{{end}}>Freitag</option>
|
||||||
</select><br>
|
</select>
|
||||||
<label for="startzeit">Startzeit</label>: <input type="time" name="startzeit" id="startzeit" min="{{printf "%02d" .EarliestStartTime.Hour}}:{{printf "%02d" .EarliestStartTime.Minute}}" max="{{printf "%02d" .LatestStartTime.Hour}}:{{printf "%02d" .LatestStartTime.Minute}}" {{if ge $.Date.Hour .EarliestStartTime.Hour}}value="{{printf "%02d" $.Date.Hour}}:{{printf "%02d" $.Date.Minute}}"{{end}} required><br>
|
<label for="tag">Tag</label>
|
||||||
<label for="dauer">Dauer in Minuten</label>: <input name="dauer" id="dauer" type="number" min="{{.MinuteGranularity}}" max="120" step="{{.MinuteGranularity}}" value="{{.Duration}}" required><br>
|
</div>
|
||||||
<label for="raum">Raum</label>:
|
|
||||||
<select name="raum" id="raum">
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control required" required type="time" name="startzeit" id="startzeit"
|
||||||
|
min="{{printf "%02d" .EarliestStartTime.Hour}}:{{printf "%02d" .EarliestStartTime.Minute}}"
|
||||||
|
max="{{printf "%02d" .LatestStartTime.Hour}}:{{printf "%02d" .LatestStartTime.Minute}}"
|
||||||
|
{{if ge $.Date.Hour .EarliestStartTime.Hour}}value="{{printf "%02d" $.Date.Hour}}:{{printf "%02d" $.Date.Minute}}" {{end}}>
|
||||||
|
<label for="startzeit">Startzeit</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control required" required name="dauer" id="dauer" type="number"
|
||||||
|
min="{{.MinuteGranularity}}" max="120" step="{{.MinuteGranularity}}"
|
||||||
|
{{ if ne .Duration 0}}value="{{.Duration}}"{{end}} placeholder="">
|
||||||
|
<label for="dauer">Dauer in Minuten</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<select class="form-select required" required name="raum" id="raum">
|
||||||
{{range $room := .Rooms}}
|
{{range $room := .Rooms}}
|
||||||
<option value="{{$room.Id}}"{{if eq $room.Id $.SelectedRoom}} selected{{end}}>{{$room.Name}}</option>
|
<option value="{{$room.Id}}"{{if eq $room.Id $.SelectedRoom}} selected{{end}}>{{$room.Name}}</option>
|
||||||
{{end}}
|
{{end}}
|
||||||
</select><br>
|
</select>
|
||||||
<label for="raumname">Raumname (für Sonderräume)</label>: <input type="text" name="raumname" id="raumname" value="{{.Roomname}}"><br>
|
<label for="raum">Raum</label>
|
||||||
<label for="name">Name</label>: <input name="name" id="name" type="text" size="50" value="{{.Name}}" required><br>
|
</div>
|
||||||
<label for="email">Email-Adresse</label>:
|
|
||||||
<input name="email" id="email" type="email" size="50" value="{{.Email}}" required><br>
|
</div>
|
||||||
<label for="info">Info</label>: <input name="info" id="info" type="text" size="50" value="{{.Info}}"><br>
|
<div class="col-md-6">
|
||||||
<input type="submit">
|
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control" type="text" name="raumname" id="raumname" value="{{.Roomname}}" placeholder="">
|
||||||
|
<label for="raumname">Raumname (für Sonderräume)</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control required" required name="name" id="name" type="text" value="{{.Name}}" placeholder="">
|
||||||
|
<label for="name">Name</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control required" required name="email" id="email" type="email" value="{{.Email}}" placeholder="">
|
||||||
|
<label for="email">Email-Adresse</label>
|
||||||
|
{{if ne .Config.Tutor.MailSuffix ""}}
|
||||||
|
<div class="form-text">
|
||||||
|
Du musst hier eine Email-Adresse angeben, die auf „{{.Config.Tutor.MailSuffix}}“ endet.<br>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control" name="info" id="info" type="text" value="{{.Info}}" placeholder="" required>
|
||||||
|
<label for="info">Info</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input class="btn btn-primary" type="submit">
|
||||||
</form>
|
</form>
|
||||||
{{if ne .Config.Tutor.MailSuffix ""}}
|
|
||||||
Du musst hier eine Email-Adresse angeben, die auf „{{.Config.Tutor.MailSuffix}}“ endet.<br>
|
|
||||||
{{end}}
|
|
||||||
Außerdem dürfen in Räumen nur begrenzt viele Sprechstunden gleichzeitig stattfinden, nämlich
|
Außerdem dürfen in Räumen nur begrenzt viele Sprechstunden gleichzeitig stattfinden, nämlich
|
||||||
<dl>
|
<dl>
|
||||||
{{range $room := .Rooms}}
|
{{range $room := .Rooms}}
|
||||||
|
|
Loading…
Reference in a new issue