2023-10-10 18:55:34 +02:00
|
|
|
{{ 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
|
|
|
|
2023-10-10 18:55:34 +02:00
|
|
|
{{ define "content" }}
|
|
|
|
<h2>Frage {{ .Question.ID }}</h2>
|
|
|
|
<p>{{ .Question.Text }}</p>
|
2023-10-10 18:43:48 +02:00
|
|
|
|
2023-10-10 18:55:34 +02:00
|
|
|
{{ template "answers" . }}
|
|
|
|
|
|
|
|
<button type="submit" hx-post="/submit-{{ .UUID }}-{{ .Question.ID }}/" hx-target="#content" hx-swap="innerHTML">
|
|
|
|
{{ end }}
|