From 0f5fe746e05f0a888fe3c823470bd6131d9349d1 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Tue, 5 Apr 2022 10:22:42 -0400 Subject: [PATCH] Add warning for legacy ASN field on site --- netbox/templates/dcim/site.html | 91 +++++++++++++++++---------------- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/netbox/templates/dcim/site.html b/netbox/templates/dcim/site.html index aa17fd57f..cf03fbf2e 100644 --- a/netbox/templates/dcim/site.html +++ b/netbox/templates/dcim/site.html @@ -80,7 +80,14 @@ AS Number - {{ object.asn|placeholder }} + + {% if object.asn %} +
+ +
+ {% endif %} + {{ object.asn|placeholder }} + Time Zone @@ -128,50 +135,44 @@ {# Legacy contact fields #} - {% with deprecation_warning="This field will be removed in a future release. Please migrate this data to contact objects." %} - {% if object.contact_name %} - - Contact Name - - {% if object.contact_name %} -
- -
- {% endif %} - {{ object.contact_name|placeholder }} - - - {% endif %} - {% if object.contact_phone %} - - Contact Phone - - {% if object.contact_phone %} -
- -
- {{ object.contact_phone }} - {% else %} - - {% endif %} - - - {% endif %} - {% if object.contact_email %} - - Contact E-Mail - - {% if object.contact_email %} -
- -
- {{ object.contact_email }} - {% else %} - - {% endif %} - - - {% endif %} + {% with deprecation_warning="This field will be removed in NetBox v3.2. Please migrate this data to contact objects." %} + + Contact Name + + {% if object.contact_name %} +
+ +
+ {% endif %} + {{ object.contact_name|placeholder }} + + + + Contact Phone + + {% if object.contact_phone %} +
+ +
+ {{ object.contact_phone }} + {% else %} + + {% endif %} + + + + Contact E-Mail + + {% if object.contact_email %} +
+ +
+ {{ object.contact_email }} + {% else %} + + {% endif %} + + {% endwith %}