{% extends 'base.html' %}

{% block content %}
<div class="container mt-4">
    <h2>{% if object %}Modifica Documento{% else %}Aggiungi Documento{% endif %}</h2>
    <form method="post" enctype="multipart/form-data">
        {% csrf_token %}
        {{ form.as_p }}
        <button type="submit" class="btn btn-primary">Salva</button>
        <a href="{% url 'cliente_detail' view.kwargs.cliente_pk|default:object.cliente.pk %}" class="btn btn-secondary">Annulla</a>
    </form>
</div>
{% endblock %}