22 lines
469 B
HTML
22 lines
469 B
HTML
{{define "answers"}}
|
|
{{range .Question.Answers}}
|
|
<div>
|
|
<input type="radio" name="answer" id="answer-{{.ID}}" value="{{.ID}}" />
|
|
<label for="answer-{{.ID}}">{{.Text}}</label>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
|
|
{{define "content"}}
|
|
<h2>Frage {{.QuestionID}}</h2>
|
|
<p>{{.Question.Text}}</p>
|
|
|
|
<form>
|
|
{{template "answers" .}}
|
|
|
|
<button hx-post="/submit-answer/{{.SessionID}}/{{.Login}}/{{.QuestionID}}/" hx-target="#content" type="submit">
|
|
Weiter
|
|
</button>
|
|
</form>
|
|
{{end}}
|