move the modal to core
This commit is contained in:
parent
2bb830c105
commit
1e9804cde3
|
@ -1,3 +1,5 @@
|
|||
{% load crispy_forms_tags %}
|
||||
|
||||
<div id="modal-backdrop" class="modal-backdrop fade show" style="display:block;"></div>
|
||||
<div id="modal" class="modal fade show" tabindex="-1" style="display:block;">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
|
@ -9,7 +11,7 @@
|
|||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button type="submit" class="btn btn-primary" hx-post="{% url 'htmx_create_customer' %}" hx-target="#htmx-create-customer">Save</button>
|
||||
<button type="submit" class="btn btn-primary" hx-post="{% url 'htmx_create_customer' %}" hx-target="#htmx-modal-position">Save</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="closeModal()">Close</button>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -1,22 +1 @@
|
|||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<div id="modal-backdrop" class="modal-backdrop fade show" style="display:block;"></div>
|
||||
<div id="modal" class="modal fade show" tabindex="-1" style="display:block;">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Add Customer</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button type="submit" class="btn btn-primary" hx-post="{% url 'htmx_create_customer' %}" hx-target="#htmx-create-customer">Save</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="closeModal()">Close</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% include "core/partials/modal.html" with form=form modal_title="Add Customer"%}
|
||||
|
|
Loading…
Reference in New Issue