mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-17 21:18:16 -06:00
14729 background task delete
This commit is contained in:
parent
3c38ae66a7
commit
f6db395749
18
netbox/templates/core/background_task_delete.html
Normal file
18
netbox/templates/core/background_task_delete.html
Normal file
@ -0,0 +1,18 @@
|
||||
{% extends 'generic/_base.html' %}
|
||||
{% load helpers %}
|
||||
{% load form_helpers %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Delete" %} {{ object_name }}?
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="modal" tabindex="-1" style="display: block; position: static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" >
|
||||
{% include 'core/htmx/delete_form.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
25
netbox/templates/core/htmx/delete_form.html
Normal file
25
netbox/templates/core/htmx/delete_form.html
Normal file
@ -0,0 +1,25 @@
|
||||
{% load form_helpers %}
|
||||
{% load i18n %}
|
||||
|
||||
<form action="{{ form_url }}" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{% trans "Confirm Deletion" %}</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
Are you sure you want to <strong class="text-danger">delete</strong> {{ object_type }} <strong>{{ object_name }}</strong>?
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% render_form form %}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
{% if return_url %}
|
||||
<a href="{{ return_url }}" class="btn btn-outline-secondary">{% trans "Cancel" %}</a>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">{% trans "Cancel" %}</button>
|
||||
{% endif %}
|
||||
<button type="submit" class="btn btn-danger">{% trans "Delete" %}</button>
|
||||
</div>
|
||||
</form>
|
Loading…
Reference in New Issue
Block a user