mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Converted DCIM DeviceType 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 device type {{ devicetype }}?{% endblock %}
|
||||
{% block title %}Delete device type {{ obj }}?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>Are you sure you want to delete <strong>{{ devicetype }}</strong>?</p>
|
||||
<p>Are you sure you want to delete <strong>{{ obj }}</strong>?</p>
|
||||
{% endblock %}
|
||||
|
@@ -1,11 +1,11 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}{% if devicetype %}Editing device type {{ devicetype }}{% else %}Add a Device Type{% endif %}{% endblock %}
|
||||
{% block title %}{% if obj %}Editing device type {{ obj }}{% else %}Add a Device Type{% endif %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if devicetype %}
|
||||
<h1>{{ devicetype }}</h1>
|
||||
{% if obj %}
|
||||
<h1>{{ obj }}</h1>
|
||||
{% else %}
|
||||
<h1>Add a Device Type</h1>
|
||||
{% endif %}
|
||||
@@ -35,9 +35,9 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3 text-center">
|
||||
{% if devicetype %}
|
||||
{% if obj %}
|
||||
<button type="submit" name="_update" class="btn btn-primary">Update</button>
|
||||
<a href="{% url 'dcim:devicetype' pk=devicetype.pk %}" class="btn btn-default">Cancel</a>
|
||||
<a href="{% url 'dcim:devicetype' 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