mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-17 09:12:18 -06:00
Consolidated bulk delete views to use a single template
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete Circuits?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>
|
||||
Are you sure you want to delete these circuits?
|
||||
</p>
|
||||
<ul>
|
||||
{% for circuit in selected_objects %}
|
||||
<li><a href="{% url 'circuits:circuit' pk=circuit.pk %}">{{ circuit }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete Providers?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>
|
||||
Are you sure you want to delete these providers?
|
||||
</p>
|
||||
<ul>
|
||||
{% for provider in selected_objects %}
|
||||
<li><a href="{% url 'circuits:provider' slug=provider.slug %}">{{ provider }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete Devices?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>
|
||||
Are you sure you want to delete these devices?
|
||||
</p>
|
||||
<ul>
|
||||
{% for device in selected_objects %}
|
||||
<li><a href="{% url 'dcim:device' pk=device.pk %}">{{ device }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete Device Types?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>
|
||||
Are you sure you want to delete these device types?
|
||||
</p>
|
||||
<ul>
|
||||
{% for devicetype in selected_objects %}
|
||||
<li><a href="{% url 'dcim:devicetype' pk=devicetype.pk %}">{{ devicetype }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete Racks?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>
|
||||
Are you sure you want to delete these racks?
|
||||
</p>
|
||||
<ul>
|
||||
{% for rack in selected_objects %}
|
||||
<li><a href="{% url 'dcim:rack' pk=rack.pk %}">{{ rack }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete Rack Groups?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>
|
||||
Are you sure you want to delete these rack groups?
|
||||
</p>
|
||||
<ul>
|
||||
{% for rg in selected_objects %}
|
||||
<li>{{ rg }} ({{ rg.site }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete Aggregates?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>
|
||||
Are you sure you want to delete these aggregates?
|
||||
</p>
|
||||
<ul>
|
||||
{% for aggregate in selected_objects %}
|
||||
<li><a href="{% url 'ipam:aggregate' pk=aggregate.pk %}">{{ aggregate }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete IP Addresses?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>
|
||||
Are you sure you want to delete these IP addresses?
|
||||
</p>
|
||||
<ul>
|
||||
{% for ipaddress in selected_objects %}
|
||||
<li><a href="{% url 'ipam:ipaddress' pk=ipaddress.pk %}">{{ ipaddress }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete Prefixes?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>
|
||||
Are you sure you want to delete these prefixes?
|
||||
</p>
|
||||
<ul>
|
||||
{% for prefix in selected_objects %}
|
||||
<li><a href="{% url 'ipam:prefix' pk=prefix.pk %}">{{ prefix }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete VLANs?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>
|
||||
Are you sure you want to delete these VLANs?
|
||||
</p>
|
||||
<ul>
|
||||
{% for vlan in selected_objects %}
|
||||
<li><a href="{% url 'ipam:vlan' pk=vlan.pk %}">{{ vlan }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete VRFs?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>
|
||||
Are you sure you want to delete these VRFs?
|
||||
</p>
|
||||
<ul>
|
||||
{% for vrf in selected_objects %}
|
||||
<li><a href="{% url 'ipam:vrf' pk=vrf.pk %}">{{ vrf }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,13 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete Secrets?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>Are you sure you want to delete these secrets?</p>
|
||||
<ul>
|
||||
{% for secret in selected_objects %}
|
||||
<li><a href="{% url 'secrets:secret' pk=secret.pk %}">{{ secret }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
15
netbox/templates/utilities/confirm_bulk_delete.html
Normal file
15
netbox/templates/utilities/confirm_bulk_delete.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete {{ obj_type_plural|default:"objects" }}?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>
|
||||
Are you sure you want to delete these {{ obj_type_plural|default:"objects" }}?
|
||||
</p>
|
||||
<ul>
|
||||
{% for obj in selected_objects %}
|
||||
<li><a href="{{ obj.get_absolute_url }}">{{ obj }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user