16 lines
424 B
HTML
Raw Normal View History

{{ define "answers" }}
{{ range .Answers }}
<label for="answer-{{ .ID }}">{{ .Text }}</label>
<input type="radio" name="answer-{{ .ID }}" id="answer-{{ .ID }}" />
{{ end }}
{{ end }}
2023-10-10 18:43:48 +02:00
{{ define "content" }}
<h2>Frage {{ .Question.ID }}</h2>
<p>{{ .Question.Text }}</p>
2023-10-10 18:43:48 +02:00
{{ template "answers" . }}
<button type="submit" hx-post="/submit-{{ .UUID }}-{{ .Question.ID }}/" hx-target="#content" hx-swap="innerHTML">
{{ end }}