2022-05-24 21:01:45 +02:00
|
|
|
{% extends "base.html" %}
|
2022-05-25 00:06:44 +02:00
|
|
|
{% load rest_framework %}
|
2022-05-24 21:01:45 +02:00
|
|
|
|
|
|
|
{% block title %}Stwórz turniej{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<h1>Stwórz turniej</h1>
|
|
|
|
<form method="post" novalidate>
|
2022-05-25 00:06:44 +02:00
|
|
|
<span>name:<input id="name" type="text" name="name" value="{{ tournament.name }}"></span><br>
|
|
|
|
<span>passing score:<input id="passing_score" type="text" name="passing_score" value="{{ tournament.passing_score }}"></span>
|
2022-05-24 21:01:45 +02:00
|
|
|
{% for question in questions %}
|
2022-05-25 01:00:30 +02:00
|
|
|
<div class="tournamentQuestionContainer">
|
2022-05-25 00:55:43 +02:00
|
|
|
<div class="mainTestName">
|
|
|
|
<div class="question_title" style="padding-top:15px; padding-bottom:10px; padding-left:5px;">
|
|
|
|
<input class="form-check-input me-1" type="radio" name={{ question.id }} value={{ question.id }}>
|
|
|
|
|
|
|
|
{{ question.description }}
|
|
|
|
</div>
|
|
|
|
<div class="list-group">
|
|
|
|
{% for answer in question.answers.all %}
|
|
|
|
<label class="list-group-item">
|
|
|
|
- {{ answer.description }}<br>
|
|
|
|
</label>
|
2022-05-25 01:00:30 +02:00
|
|
|
|
2022-05-25 00:55:43 +02:00
|
|
|
{% endfor %}
|
2022-05-25 01:00:30 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-05-24 21:01:45 +02:00
|
|
|
{% endfor %}
|
2022-05-25 01:00:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="testContent">
|
2022-05-25 00:55:43 +02:00
|
|
|
<input type="submit" value="Stwórz turniej">
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
2022-05-24 21:01:45 +02:00
|
|
|
|
2022-05-25 00:55:43 +02:00
|
|
|
{% endblock %}
|