{% extends 'base.html' %}

{% block content %}
<div class="container mt-4">
    <div class="card">
        <div class="card-header">
            <h1 class="card-title">Carica Nuovo Documento</h1>
        </div>
        <div class="card-body">
            <form method="post" enctype="multipart/form-data">
                {% csrf_token %}
                <div class="mb-3">
                    <label for="id_client" class="form-label">Cliente</label>
                    {{ form.client }}
                </div>
                <div class="mb-3">
                    <label for="id_title" class="form-label">Titolo</label>
                    {{ form.title }}
                </div>
                <div class="mb-3">
                    <label for="id_description" class="form-label">Descrizione</label>
                    {{ form.description }}
                </div>
                <div class="mb-3">
                    <label for="id_file" class="form-label">File</label>
                    {{ form.file }}
                </div>
                <button type="submit" class="btn btn-primary">Carica</button>
                <a href="{% url 'document_list' %}" class="btn btn-secondary">Annulla</a>
            </form>
        </div>
    </div>
</div>
{% endblock %}
