43 lines
1.9 KiB
HTML
43 lines
1.9 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n static %}
|
|
{% load crispy_forms_filters %}
|
|
{% block title %}
|
|
{# Check if an 'object' exists in the context #}
|
|
{% if object %}
|
|
{% trans 'Update Customer' %}
|
|
{% else %}
|
|
{% trans 'Add New Customer' %}
|
|
{% endif %}
|
|
{% endblock %}
|
|
{% block content %}
|
|
<div class="row justify-content-center mt-5 mb-3">
|
|
<div class="col-lg-8 col-md-10">
|
|
<div class="card shadow-sm border-o rounded-3">
|
|
<div class="card-header bg-gray-200 py-3 border-0 rounded-top-3">
|
|
<h3 class="mb-0 fs-4 text-center">
|
|
{% if customer.created %}
|
|
{{ _("Edit Customer") }}
|
|
{% else %}
|
|
{{ _("Add Customer") }}
|
|
{% endif %}
|
|
<i class="fa-solid fa-user ms-2 text-primary"></i>
|
|
</h3>
|
|
</div>
|
|
<div class="card-body bg-light-subtle">
|
|
<form method="post"
|
|
class="form row g-3 needs-validation"
|
|
enctype="multipart/form-data"
|
|
novalidate>
|
|
{% csrf_token %}
|
|
{{ form|crispy }}
|
|
<hr class="my-2">
|
|
<div class="d-grid gap-2 d-md-flex justify-content-md-center mt-3">
|
|
<button class="btn btn-phoenix-primary btn-lg me-md-2" type="submit"><i class="fa-solid fa-floppy-disk me-1"></i>{{ _("Save") }}</button>
|
|
<a href="{% url 'customer_list' request.dealer.slug %}" class="btn btn-lg btn-phoenix-secondary"><i class="fa-solid fa-ban me-1"></i>{% trans "Cancel" %}</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|