SOITA/templates/editQuestion.html

40 lines
1.6 KiB
HTML
Raw Normal View History

2022-01-30 20:04:27 +01:00
{% extends "base.html" %}
{% load rest_framework %}
{% block title %}{{ test.name }} - Edytuj{% endblock %}
{% block additional_head %}
<meta charset="UTF-8">
{% endblock %}
{% block content %}
<div class="editContainer">
<form method="post" novalidate>
<div class="editContainerSection">
<div class="editContainerLine">
<label for="desc"><b>Opis:</b></label>
<input id="desc" type="text" name="desc", value="{{ question.description }}">
</div>
{% for answer in question.answers.all %}
<div class="editContainerLine">
<label for="ans-{{ forloop.counter }}">Odpowiedź {{ forloop.counter }}: </label>
<input id="ans-{{ forloop.counter }}" type="text" name="ans{{ forloop.counter }}", value="{{ answer.description }}">
</div>
{% endfor %}
<div class="editContainerLine">
<label for="category">Poprawna: </label>
<select name="is_correct" id="is_correct">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</div>
</div>
<div class="testContent">
<input type="submit" value="Zapisz zmiany">
</div>
</form>
</div>
{% endblock %}