Added warning message about automatically deleting child inventory items

This commit is contained in:
Jeremy Stretch 2018-01-31 10:25:06 -05:00
parent e0aa2c33e9
commit 8bedfcfc64
3 changed files with 8 additions and 1 deletions

View File

@ -1869,4 +1869,5 @@ class InventoryItemBulkDeleteView(PermissionRequiredMixin, BulkDeleteView):
cls = InventoryItem
queryset = InventoryItem.objects.select_related('device', 'manufacturer')
table = tables.InventoryItemTable
template_name = 'dcim/inventoryitem_bulk_delete.html'
default_return_url = 'dcim:inventoryitem_list'

View File

@ -0,0 +1,5 @@
{% extends 'utilities/obj_bulk_delete.html' %}
{% block message_extra %}
<p class="text-center text-danger"><i class="fa fa-warning"></i> This will also delete all child inventory items of those listed.</p>
{% endblock %}

View File

@ -9,7 +9,8 @@
<div class="panel panel-danger">
<div class="panel-heading"><strong>Confirm Bulk Deletion</strong></div>
<div class="panel-body">
<strong>Warning:</strong> The following operation will delete {{ table.rows|length }} {{ obj_type_plural }}. Please carefully review the {{ obj_type_plural }} to be deleted and confirm below.
<p><strong>Warning:</strong> The following operation will delete {{ table.rows|length }} {{ obj_type_plural }}. Please carefully review the {{ obj_type_plural }} to be deleted and confirm below.</p>
{% block message_extra %}{% endblock %}
</div>
</div>
</div>