38 lines
884 B
HTML

{{ define "add-buttons" }}
<div id="briefing-buttons">
<button type="button" hx-post="/new-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" }}
{{ template "add-buttons" . }}
<p>{{ .Login }}</p>
{{ end }}
{{ define "content" }}
<form>
<div>
<label for="location">Ort</label>
<input id="location" name="location" required type="text" />
</div>
<div>
<label for="document">Dokument</label>
<input id="document" name="document" required type="text" />
</div>
<div>
<label for="as-of">Stand vom</label>
<input id="as-of" name="as-of" required type="date" />
</div>
{{ template "add-buttons" . }}
</form>
{{ end }}