Bei 82870e10 war question.html nicht gespeichert

This commit is contained in:
Jason Streifling 2023-10-10 18:55:34 +02:00
parent bf05bc0be7
commit f80dca4b10

View File

@ -1,14 +1,15 @@
{{ define "question" }} {{ define "answers" }}
<div id="question-{{ .QuestionNumber }}"> {{ range .Answers }}
<h2>Frage {{ .QuestionNumber }} <label for="answer-{{ .ID }}">{{ .Text }}</label>
<p>{{ .Question }}</p <input type="radio" name="answer-{{ .ID }}" id="answer-{{ .ID }}" />
<label for="participant-first-input-{{ . }}">Vorname</label>
<input type="text" name="participant-first-{{ . }}" id="participant-first-input-{{ . }}" />
<label for="participant-last-input-{{ . }}">Nachname</label>
<input type="text" name="participant-last-{{ . }}" id="participant-last-input-{{ . }}" />
<label for="participant-company-input-{{ . }}">Firma</label>
<input type="text" name="participant-company-{{ . }}" id="participant-company-input-{{ . }}" />
</div>
{{ end }} {{ end }}
{{ end }}
{{ define "content" }}
<h2>Frage {{ .Question.ID }}</h2>
<p>{{ .Question.Text }}</p>
{{ template "answers" . }}
<button type="submit" hx-post="/submit-{{ .UUID }}-{{ .Question.ID }}/" hx-target="#content" hx-swap="innerHTML">
{{ end }}