mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Converted DCIM rack 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 rack {{ rack }}?{% endblock %}
|
||||
{% block title %}Delete rack {{ obj }}?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>Are you sure you want to delete rack {{ rack }} from {{ rack.site }}?</p>
|
||||
<p>Are you sure you want to delete rack {{ obj }} from {{ obj.site }}?</p>
|
||||
{% endblock %}
|
||||
|
@@ -1,11 +1,11 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}{% if rack %}Editing rack {{ rack }}{% else %}Add a rack{% endif %}{% endblock %}
|
||||
{% block title %}{% if obj %}Editing rack {{ obj }}{% else %}Add a rack{% endif %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if rack %}
|
||||
<h1>Rack {{ rack }}</h1>
|
||||
{% if obj %}
|
||||
<h1>Rack {{ obj }}</h1>
|
||||
{% else %}
|
||||
<h1>Add a Rack</h1>
|
||||
{% endif %}
|
||||
@@ -47,9 +47,9 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
{% if rack %}
|
||||
{% if obj %}
|
||||
<button type="submit" name="_update" class="btn btn-primary">Update</button>
|
||||
<a href="{% url 'dcim:rack' pk=rack.pk %}" class="btn btn-default">Cancel</a>
|
||||
<a href="{% url 'dcim:rack' 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>
|
||||
|
Reference in New Issue
Block a user