Bilder als Antworten hinzugefügt

This commit is contained in:
2023-11-02 17:52:04 +01:00
parent 2b9d9d7656
commit 404e079343
8 changed files with 49 additions and 15 deletions

View File

@ -13,7 +13,11 @@
{{range .Question.Answers}}
<div>
<input type="radio" name="answer" id="answer-{{.ID}}" value="{{.ID}}" />
{{if .IsImage}}
<img src="{{.Text}}" alt="{{.Text}}" />
{{else}}
<label for="answer-{{.ID}}">{{.Text}}</label>
{{end}}
</div>
{{end}}
{{end}}