Converted all delete CBVs to use utilities/obj_delete.html

This commit is contained in:
Jeremy Stretch
2016-05-12 15:46:02 -04:00
parent bf364b7466
commit f4b14b42ee
19 changed files with 19 additions and 158 deletions

View File

@@ -1,8 +0,0 @@
{% extends 'utilities/confirmation_form.html' %}
{% load form_helpers %}
{% block title %}Delete {{ obj.provider }} - {{ obj.cid }}?{% endblock %}
{% block message %}
<p>Are you sure you want to delete circuit {{ obj }} from {{ obj.site }}?</p>
{% endblock %}

View File

@@ -1,8 +0,0 @@
{% extends 'utilities/confirmation_form.html' %}
{% load form_helpers %}
{% block title %}Delete provider {{ obj }}?{% endblock %}
{% block message %}
<p>Are you sure you want to delete provider {{ obj }}?</p>
{% endblock %}

View File

@@ -1,8 +0,0 @@
{% extends 'utilities/confirmation_form.html' %}
{% load form_helpers %}
{% block title %}Delete device {{ obj }}?{% endblock %}
{% block message %}
<p>Are you sure you want to delete <strong>{{ obj }}</strong>?</p>
{% endblock %}

View File

@@ -1,8 +0,0 @@
{% extends 'utilities/confirmation_form.html' %}
{% load form_helpers %}
{% block title %}Delete device type {{ obj }}?{% endblock %}
{% block message %}
<p>Are you sure you want to delete <strong>{{ obj }}</strong>?</p>
{% endblock %}

View File

@@ -1,8 +0,0 @@
{% extends 'utilities/confirmation_form.html' %}
{% load form_helpers %}
{% block title %}Delete rack {{ obj }}?{% endblock %}
{% block message %}
<p>Are you sure you want to delete rack {{ obj }} from {{ obj.site }}?</p>
{% endblock %}

View File

@@ -1,8 +0,0 @@
{% extends 'utilities/confirmation_form.html' %}
{% load form_helpers %}
{% block title %}Delete site {{ obj }}?{% endblock %}
{% block message %}
<p>Are you sure you want to delete site {{ obj }}?</p>
{% endblock %}

View File

@@ -1,8 +0,0 @@
{% extends 'utilities/confirmation_form.html' %}
{% load form_helpers %}
{% block title %}Delete aggregate {{ obj }}?{% endblock %}
{% block message %}
<p>Are you sure you want to delete {{ obj }}?</p>
{% endblock %}

View File

@@ -1,8 +0,0 @@
{% extends 'utilities/confirmation_form.html' %}
{% load form_helpers %}
{% block title %}Delete IP address {{ obj }}?{% endblock %}
{% block message %}
<p>Are you sure you want to delete {{ obj }}?</p>
{% endblock %}

View File

@@ -1,8 +0,0 @@
{% extends 'utilities/confirmation_form.html' %}
{% load form_helpers %}
{% block title %}Delete prefix {{ obj }}?{% endblock %}
{% block message %}
<p>Are you sure you want to delete {{ obj }}?</p>
{% endblock %}

View File

@@ -1,22 +0,0 @@
{% extends 'utilities/confirmation_form.html' %}
{% load form_helpers %}
{% block title %}Delete VLAN {{ obj }}?{% endblock %}
{% block message %}
<p>
Are you sure you want to delete this VLAN?
{% if obj.prefix_set.count %}
The following prefixes will also be deleted:
{% else %}
(There are no prefixes associated with this VLAN.)
{% endif %}
</p>
{% if obj.prefix_set.count %}
<ul>
{% for p in obj.prefix_set.all %}
<li><a href="{% url 'ipam:prefix' pk=p.pk %}">{{ p }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}

View File

@@ -1,22 +0,0 @@
{% extends 'utilities/confirmation_form.html' %}
{% load form_helpers %}
{% block title %}Delete VRF {{ obj }}?{% endblock %}
{% block message %}
<p>
Are you sure you want to delete this VRF?
{% if obj.prefix_set.count %}
The following prefixes will also be deleted:
{% else %}
(There are no prefixes associated with this VRF.)
{% endif %}
</p>
{% if obj.prefix_set.count %}
<ul>
{% for p in obj.prefix_set.all %}
<li><a href="{% url 'ipam:prefix' pk=p.pk %}">{{ p }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}

View File

@@ -9,7 +9,7 @@
<div class="panel panel-danger">
<div class="panel-heading">{% block title %}{% endblock %}</div>
<div class="panel-body">
{% block message %}Are you sure?{% endblock %}
{% block message %}<p>Are you sure?</p>{% endblock %}
{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}

View File

@@ -0,0 +1,9 @@
{% extends 'utilities/confirmation_form.html' %}
{% load form_helpers %}
{% block title %}Delete {{ obj_type }}?{% endblock %}
{% block message %}
<p>Are you sure you want to delete {{ obj_type }} <strong>{{ obj }}</strong>?</p>
{% block message_extra %}{% endblock %}
{% endblock %}