{% extends 'generic/_base.html' %} {% load form_helpers %} {% load helpers %} {% load i18n %} {% load render_table from django_tables2 %} {% comment %} Blocks: - title: Page title - tabs: Page tabs - content: Primary page content Context: - model: The model class of the objects being deleted - form: The bulk delete form class - table: The table class for rendering list of objects being deleted - return_url: The URL to which the user is redirected after submitting the form {% endcomment %} {% block title %} {% trans "Delete" %} {{ table.rows|length }} {{ model|meta:"verbose_name_plural"|bettertitle }}? {% endblock %} {% block tabs %} {% endblock tabs %} {% block content %} {# Confirmation form #}
{% csrf_token %} {# Form fields #} {% for field in form.hidden_fields %} {{ field }} {% endfor %} {# Meta fields #}
{% if form.changelog_message %} {% render_field form.changelog_message %} {% endif %}
{# Cascade over routing rows. Off by default: unticked, this is NetBox's own delete. #} {% with blockers=request.forward_delete_blockers %} {% if blockers.other %} {% endif %}
{% trans "netbox-routing stops NetBox deleting a device that has OSPF or BGP records. Tick this to remove those records first, in the same step. If the delete then fails, they are restored." %} {% if blockers.routing %}
{% trans "Blocking these devices now:" %} {% for label, count in blockers.routing.items %}{{ label }} ×{{ count }}{% if not forloop.last %}, {% endif %}{% endfor %} {% endif %}
{% endwith %} {# Form buttons #}
{% trans "Cancel" %}
{# /Confirmation form #} {# Selected objects list #}
{% render_table table 'inc/table.html' %}
{# /Selected objects list #} {% endblock content %}