{% extends 'mainapp/base.html' %}

{% block title %}Новое событие{% endblock %}

{% block content %}
<div class="container">
    <div class="row justify-content-center">
        <div class="col-lg-8">
            <div class="card shadow-sm border-0">
                <div class="card-header bg-success text-white">
                    <h2 class="mb-0">Формирование таблицы Кубсат</h2>
                </div>
                <div class="card-body">
                    <form method="post" enctype="multipart/form-data">
                        {% csrf_token %}
                        {% comment%}
                        <div class="mb-4">
                            <label for="{{ form.sat_choice.id_for_label }}" class="form-label">{{ form.sat_choice.label }}</label>
                            {{ form.sat_choice }}
                            {% if form.sat_choice.errors %}
                                <div class="text-danger mt-1">{{ form.sat_choice.errors }}</div>
                            {% endif %}
                        </div>{% endcomment %}

                        {% comment %} <div class="mb-4">
                            <label for="{{ form.pol_choice.id_for_label }}" class="form-label">{{ form.pol_choice.label }}</label>
                            {{ form.pol_choice }}
                            {% if form.pol_choice.errors %}
                                <div class="text-danger mt-1">{{ form.pol_choice.errors }}</div>
                            {% endif %}
                        </div>  {% endcomment %}
                        
                        <div class="mb-4">
                            <label for="{{ form.file.id_for_label }}" class="form-label">{{ form.file.label }}</label>
                            {{ form.file }}
                            {% if form.file.errors %}
                                <div class="text-danger mt-1">{{ form.file.errors }}</div>
                            {% endif %}
                            <div class="form-text">Выберите файл для загрузки</div>
                        </div>
                        
                        <div class="d-flex justify-content-between">
                            <a href="{% url 'mainapp:source_list' %}" class="btn btn-secondary">Назад</a>
                            <button type="submit" class="btn btn-success">Выполнить</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}