mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-15 00:02:17 -06:00
Converted circuits add/edit/delete views to CBVs
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete {{ circuit.provider }} Circuit {{ circuit.cid }}?{% endblock %}
|
||||
{% block title %}Delete {{ obj.provider }} - {{ obj.cid }}?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>Are you sure you want to delete rack {{ circuit }} from {{ circuit.site }}?</p>
|
||||
<p>Are you sure you want to delete circuit {{ obj }} from {{ obj.site }}?</p>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}{% if circuit %}Editing {{ circuit }}{% else %}Add a circuit{% endif %}{% endblock %}
|
||||
{% block title %}{% if obj %}Editing {{ obj }}{% else %}Add a circuit{% endif %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if circuit %}
|
||||
<h1>Editing {{ circuit.provider }} circuit {{ circuit.cid }}</h1>
|
||||
{% if obj %}
|
||||
<h1>Editing {{ obj.provider }} circuit {{ obj.cid }}</h1>
|
||||
{% else %}
|
||||
<h1>Add a Circuit</h1>
|
||||
{% endif %}
|
||||
@@ -70,9 +70,9 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
{% if circuit %}
|
||||
{% if obj %}
|
||||
<button type="submit" name="_update" class="btn btn-primary">Update</button>
|
||||
<a href="{% url 'circuits:circuit' pk=circuit.pk %}" class="btn btn-default">Cancel</a>
|
||||
<a href="{% url 'circuits:circuit' pk=obj.pk %}" class="btn btn-default">Cancel</a>
|
||||
{% else %}
|
||||
<button type="submit" name="_create" class="btn btn-primary">Create</button>
|
||||
<button type="submit" name="_addanother" class="btn btn-primary">Create and Add Another</button>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete provider {{ provider }}?{% endblock %}
|
||||
{% block title %}Delete provider {{ obj }}?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>Are you sure you want to delete provider {{ provider }}?</p>
|
||||
<p>Are you sure you want to delete provider {{ obj }}?</p>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}{% if provider %}Editing {{ provider }}{% else %}Add a provider{% endif %}{% endblock %}
|
||||
{% block title %}{% if obj %}Editing {{ obj }}{% else %}Add a provider{% endif %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if provider %}
|
||||
<h1>Editing {{ provider }}</h1>
|
||||
{% if obj %}
|
||||
<h1>Editing {{ obj }}</h1>
|
||||
{% else %}
|
||||
<h1>Add a Provider</h1>
|
||||
{% endif %}
|
||||
@@ -55,9 +55,9 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
{% if provider %}
|
||||
{% if obj %}
|
||||
<button type="submit" name="_update" class="btn btn-primary">Update</button>
|
||||
<a href="{% url 'circuits:provider' slug=provider.slug %}" class="btn btn-default">Cancel</a>
|
||||
<a href="{% url 'circuits:provider' slug=obj.slug %}" class="btn btn-default">Cancel</a>
|
||||
{% else %}
|
||||
<button type="submit" name="_create" class="btn btn-primary">Create</button>
|
||||
<button type="submit" name="_addanother" class="btn btn-primary">Create and Add Another</button>
|
||||
|
||||
Reference in New Issue
Block a user