Files
Quiz-for-Mont/templates/invite/form.html
2025-09-04 11:27:16 +03:00

62 lines
2.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "layout.html" %}
{% block content %}
<div class="container my-5">
<h2 class="text-center mb-4">Опрос: {{ survey.survey_type.name }}</h2>
<form method="POST">
{% if invite.ask_full_name or invite.ask_phone or invite.ask_organization %}
<div class="card mb-4">
<div class="card-header bg-info text-white fw-bold">
Информация о респонденте
</div>
<div class="card-body">
{% if invite.ask_full_name %}
<div class="mb-3">
<label for="full_name" class="form-label">ФИО</label>
<input type="text" name="full_name" id="full_name" class="form-control" required>
</div>
{% endif %}
{% if invite.ask_phone %}
<div class="mb-3">
<label for="phone" class="form-label">Телефон</label>
<input type="text" name="phone" id="phone" class="form-control" required>
</div>
{% endif %}
{% if invite.ask_organization %}
<div class="mb-3">
<label for="organization" class="form-label">Наименование организации</label>
<input type="text" name="organization" id="organization" class="form-control" required>
</div>
{% endif %}
</div>
</div>
{% endif %}
{% for group, items in questions.items() %}
<div class="card mb-4 shadow-sm">
<div class="card-header bg-primary text-white fw-bold">
{{ group }}
</div>
<div class="card-body">
{% for key, text in items.items() %}
<div class="form-check mb-2">
<input class="form-check-input" type="checkbox" name="{{ key }}" id="{{ key }}">
<label class="form-check-label" for="{{ key }}">{{ text }}</label>
</div>
{% endfor %}
</div>
</div>
{% endfor %}
<div class="mb-4">
<label for="comment" class="form-label">Комментарий</label>
<textarea name="comment" id="comment" class="form-control" rows="4" placeholder="Оставьте ваш комментарий..."></textarea>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary btn-lg" id="submitBtn">
Отправить
</button>
</div>
</form>
</div>
{% endblock %}