{% extends 'generic/base.html' %}
{% load crispy_forms_tags %}

{% block content %}
<div class="container py-4">
    <div class="row justify-content-center">
        <div class="col-md-8 col-lg-6">
            <div class="card shadow">
                <div class="card-header bg-primary text-white">
                    <h3 class="card-title mb-0">Import Exam Answers</h3>
                </div>
                <div class="card-body">
                    <p class="text-muted">
                        Upload a JSON file containing exam answers manually exported from RTS.
                    </p>
                    <form method="post" enctype="multipart/form-data">
                        {% csrf_token %}
                        <div class="mb-3">
                            <label for="answers_file" class="form-label">Answers JSON File</label>
                            <input type="file" class="form-control" id="answers_file" name="answers_file" accept=".json" required>
                        </div>
                        <div class="d-flex justify-content-between align-items-center mt-4">
                            <a href="{% url 'generic:manage_cids' %}" class="btn btn-secondary">Cancel</a>
                            <button type="submit" class="btn btn-primary">Import Answers</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
