47 lines
1.1 KiB
HTML
Raw Normal View History

2023-10-26 10:05:21 +02:00
{{ define "add-buttons" }}
<div id="briefing-buttons">
<button type="button" hx-post="/add-participant-{{ .SessionID }}/" hx-target="#briefing-buttons" hx-swap="outerHTML">
Neuer Teilnehmer
</button>
<button type="submit" hx-post="/submit-form-{{ .SessionID }}/" hx-target="#content" hx-swap="innerHTML">
Fertig
</button>
</div>
{{ end }}
{{ define "new" }}
2023-10-26 10:05:21 +02:00
{{ template "add-buttons" . }}
<p>{{ .Login }}</p>
{{ end }}
{{ define "content" }}
<form>
<div id="instructor">
2023-10-20 16:33:00 +02:00
<label for="instructor">Unterweiser</label>
<select id="instructor" name="instructor">
{{ range .Options }}
<option value="{{ .ID }}">{{ .String }}</option>
{{ end }}
</select>
</div>
<div id="location">
2023-10-20 16:33:00 +02:00
<label for="location">Ort</label>
<input type="text" name="location" id="location" />
</div>
<div id="document-name">
<label for="document-name">Dokument</label>
<input type="text" name="document-name" id="document-name" />
</div>
<div id="state">
2023-10-20 16:33:00 +02:00
<label for="as-of">Stand vom</label>
<input type="date" name="as-of" id="as-of" />
</div>
2023-10-26 10:05:21 +02:00
{{ template "add-buttons" . }}
</form>
{{ end }}