mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-18 17:52:21 -06:00
Initial work on #8231
This commit is contained in:
@@ -100,4 +100,8 @@
|
||||
<div class="tab-content">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock content-wrapper %}
|
||||
|
||||
{% block modals %}
|
||||
{% include 'inc/htmx_modal.html' %}
|
||||
{% endblock modals %}
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
{% extends 'generic/confirmation_form.html' %}
|
||||
{% extends 'base/layout.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete {{ obj_type }}?{% endblock %}
|
||||
{% block title %}Delete {{ object_type }}?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>Are you sure you want to <strong class="text-danger">delete</strong> {{ obj_type }} <strong>{{ obj }}</strong>?</p>
|
||||
{% block message_extra %}{% endblock %}
|
||||
{% endblock message %}
|
||||
{% block header %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="modal" tabindex="-1" style="display: block; position: static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" >
|
||||
{% include 'htmx/delete_form.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
20
netbox/templates/htmx/delete_form.html
Normal file
20
netbox/templates/htmx/delete_form.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{% load form_helpers %}
|
||||
|
||||
<form action="{{ form_url }}" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Confirm Deletion</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Are you sure you want to <strong class="text-danger">delete</strong> {{ object_type }} <strong>{{ object }}</strong>?</p>
|
||||
{% render_form form %}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
{% if return_url %}
|
||||
<a href="{{ return_url }}" class="btn btn-outline-secondary">Cancel</a>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
{% endif %}
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
</div>
|
||||
</form>
|
||||
7
netbox/templates/inc/htmx_modal.html
Normal file
7
netbox/templates/inc/htmx_modal.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="modal fade" id="htmx-modal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" id="htmx-modal-content">
|
||||
{# Dynamic content goes here #}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,5 +0,0 @@
|
||||
{% extends 'generic/object_delete.html' %}
|
||||
|
||||
{% block message_extra %}
|
||||
<p>Note: This will <strong>not</strong> delete any child prefixes or IP addresses.</p>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user