{% extends "base.html" %}
{% load i18n %}
{% load crispy_forms_filters %}
{% block title %}{% trans "customers" %}{% endblock title %}

{% block content %}
<div class="container my-5">
    <!-- Display Form Errors -->
    <div class="card shadow rounded">
        <div class="card-header bg-primary text-white">
            <p class="mb-0">
                {% if customer.created %}
                <!--<i class="bi bi-pencil-square"></i>--> 
                    {{ _("Edit Customer") }}
                {% else %}
                <!--<i class="bi bi-person-plus"></i> -->
                    {{ _("Add Customer") }}
                {% endif %}
            </p>
        </div>
        <div class="card-body">
            <form method="post" class="form" novalidate>
                 {% csrf_token %}
            {{ form|crispy }}
                {% for error in form.errors %}
                <div class="text-danger">{{ error }}</div>
                {% endfor %}
             <div class="d-flex justify-content-end">
                    <button class="btn btn-sm btn-success me-1" type="submit">
                        <!--<i class="bi bi-save"></i> -->
                        {{ _("Save") }}
                    </button>
                 <a href="{{request.META.HTTP_REFERER}}" class="btn btn-sm btn-danger">{% trans "Cancel" %}</a>
                </div>
            </form>
        </div>
    </div>
</div>
{% endblock %}