<!-- templates/admin/import_file.html -->
{% extends "admin/base_site.html" %}
{% load i18n static %}

{% block title %}{% trans 'Import File' %}{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
    &rsaquo; {% trans 'Import File' %}
</div>
{% endblock %}

{% block content %}
<div class="module">
    <form method="post" enctype="multipart/form-data" novalidate>
        {% csrf_token %}

        <div class="form-row">
            <div class="field-box">
                {{ form.source.label_tag }}
                {{ form.source }}
            </div>

            <div class="field-box">
                {{ form.file.label_tag }}
                {{ form.file }}
                {% if form.file.help_text %}
                    <div class="help">{{ form.file.help_text }}</div>
                {% endif %}
                {% if form.file.errors %}
                    <ul class="errorlist">
                        {% for error in form.file.errors %}
                            <li>{{ error }}</li>
                        {% endfor %}
                    </ul>
                {% endif %}
            </div>
        </div>

        <div class="submit-row">
            <input type="submit" value="{% trans 'Import File' %}" class="default" />
            <a href="{% url 'admin:index' %}" class="button cancel-link">{% trans 'Cancel' %}</a>
        </div>
    </form>
</div>

<div class="module">
    <h2>{% trans 'Instructions' %}</h2>
    <p>{% trans 'Select a file to import and click "Import File" to process it.' %}</p>
    <p>{% trans 'Supported file formats: CSV, Excel (XLSX, XLS), and Text files.' %}</p>
</div>
{% endblock %}
