From 924471ee76a2184fd0080d7966da57b589c82859 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Tue, 30 Aug 2022 09:16:17 -0400 Subject: [PATCH] Clean up cable terminations display & edit form --- netbox/dcim/tables/template_code.py | 2 +- netbox/templates/dcim/cable_edit.html | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/netbox/dcim/tables/template_code.py b/netbox/dcim/tables/template_code.py index ffc867e78..eeb0504d6 100644 --- a/netbox/dcim/tables/template_code.py +++ b/netbox/dcim/tables/template_code.py @@ -4,7 +4,7 @@ LINKTERMINATION = """ {{ termination.parent_object }} {% endif %} - {{ termination }}{% if not forloop.last %},{% endif %} + {{ termination }}{% if not forloop.last %}
{% endif %} {% empty %} {{ ''|placeholder }} {% endfor %} diff --git a/netbox/templates/dcim/cable_edit.html b/netbox/templates/dcim/cable_edit.html index e2cef7601..29bb60d70 100644 --- a/netbox/templates/dcim/cable_edit.html +++ b/netbox/templates/dcim/cable_edit.html @@ -1,18 +1,8 @@ -{% extends 'base/layout.html' %} +{% extends 'generic/object_edit.html' %} {% load static %} {% load helpers %} {% load form_helpers %} -{% block title %}Connect Cable{% endblock %} - -{% block tabs %} - -{% endblock %} - {% block content-wrapper %}
{% render_errors form %} @@ -116,8 +106,12 @@
+ {% if object.pk %} + + {% else %} + + {% endif %} Cancel -