45 lines
1.1 KiB
HTML
Raw Normal View History

{{ define "add-button" }}
<button type="button" hx-post="/add-participant/" hx-target="this" hx-swap="outerHTML">
Neuer Teilnehmer
</button>
{{ end }}
{{ define "new" }}
<span>{{ . }}</span>
{{ template "add-button" . }}
{{ 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>
{{ template "add-button" . }}
2023-10-20 16:33:00 +02:00
<button type="submit" hx-post="/submit-form-{{ .SessionID }}/" hx-target="#content" hx-swap="innerHTML">
OK
</button>
</form>
{{ end }}