centered popup modals

This commit is contained in:
Thomas Nahuel Rusiecki 2024-11-21 10:45:18 -03:00
parent b77120a4c3
commit 18d9eef6ef
1 changed files with 8 additions and 5 deletions

View File

@ -149,7 +149,7 @@
<!-- pop up modal for delete confirmation --> <!-- pop up modal for delete confirmation -->
{% for a in object.get_user_properties %} {% for a in object.get_user_properties %}
<div class="modal fade" id="deleteModal{{ a.id }}" tabindex="-1" aria-labelledby="deleteModalLabel{{ a.id }}" aria-hidden="true"> <div class="modal fade" id="deleteModal{{ a.id }}" tabindex="-1" aria-labelledby="deleteModalLabel{{ a.id }}" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog modal-dialog-centered">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel{{ a.id }}">{% trans "Confirm Deletion" %}</h5> <h5 class="modal-title" id="deleteModalLabel{{ a.id }}">{% trans "Confirm Deletion" %}</h5>
@ -160,7 +160,7 @@
<p><strong>{% trans "Value:" %}</strong> {{ a.value }}</p> <p><strong>{% trans "Value:" %}</strong> {{ a.value }}</p>
<p><strong>{% trans "Created on:" %}</strong> {{ a.created }}</p> <p><strong>{% trans "Created on:" %}</strong> {{ a.created }}</p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer justify-content-center">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans "Cancel" %}</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans "Cancel" %}</button>
<form method="post" action="{% url 'device:delete_user_property' a.id %}"> <form method="post" action="{% url 'device:delete_user_property' a.id %}">
{% csrf_token %} {% csrf_token %}
@ -175,7 +175,7 @@
<!-- popup modals for edit button --> <!-- popup modals for edit button -->
{% for a in object.get_user_properties %} {% for a in object.get_user_properties %}
<div class="modal fade" id="editModal{{ a.id }}" tabindex="-1" aria-labelledby="editModalLabel{{ a.id }}" aria-hidden="true"> <div class="modal fade" id="editModal{{ a.id }}" tabindex="-1" aria-labelledby="editModalLabel{{ a.id }}" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog modal-dialog-centered">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="editModalLabel{{ a.id }}">{% trans "Edit User Property" %}</h5> <h5 class="modal-title" id="editModalLabel{{ a.id }}">{% trans "Edit User Property" %}</h5>
@ -192,7 +192,10 @@
<label for="value" class="form-label">{% trans "Value" %}</label> <label for="value" class="form-label">{% trans "Value" %}</label>
<input type="text" class="form-control" id="value" name="value" value="{{ a.value }}"> <input type="text" class="form-control" id="value" name="value" value="{{ a.value }}">
</div> </div>
<div class="modal-footer justify-content-center">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans "Cancel" %}</button>
<button type="submit" class="btn btn-primary">{% trans "Save changes" %}</button> <button type="submit" class="btn btn-primary">{% trans "Save changes" %}</button>
</div>
</form> </form>
</div> </div>
</div> </div>