haikal/templates/crm/leads/lead_form.html
2025-08-27 13:04:41 +03:00

68 lines
2.7 KiB
HTML

{% extends 'base.html' %}
{% load i18n static crispy_forms_filters %}
{% block title %}
{% if object %}
{% trans 'Update Lead' %}
{% else %}
{% trans 'Add New Lead' %}
{% endif %}
{% endblock %}
{% block customcss %}
<style>
.htmx-indicator{
opacity:0;
transition: opacity 500ms ease-in;
}
.htmx-request .htmx-indicator{
opacity:1;
}
.htmx-request.htmx-indicator{ /* For elements with htmx-indicator itself becoming the target */
opacity:1;
}
/* Style for the inline spinner if needed */
.inline-spinner {
width: 1.5rem; /* Adjust size */
height: 1.5rem; /* Adjust size */
vertical-align: middle;
margin-left: 0.5rem; /* Space from the field */
}
</style>
{% endblock customcss %}
{% block content %}
<main class="d-flex align-items-center justify-content-center min-vh-100 py-5">
<div class="col-md-8">
<div class="card shadow-lg border-0 rounded-4 overflow-hidden animate__animated animate__fadeInUp">
<div class="card-header bg-gradient py-4 border-0 rounded-top-4">
<h3 class="mb-0 fs-4 fw-bold text-center">
{% if object %}
{% trans "Update Lead" %}
<i class="fa-solid fa-edit ms-2"></i>
{% else %}
{% trans "Create New Lead" %}
<i class="fa-solid fa-bullhorn ms-2"></i>
{% endif %}
</h3>
</div>
<div class="card-body p-4 p-md-5">
<form class="form" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form|crispy }}
<hr class="my-4">
<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>
{% trans "Save" %}
</button>
<a href="{% url 'lead_list' request.dealer.slug %}"
class="btn btn-phoenix-secondary btn-lg">
<i class="fa-solid fa-ban me-1"></i>
{% trans "Cancel" %}
</a>
</div>
</form>
</div>
</div>
</div>
</main>
{% endblock %}