Add warning for legacy ASN field on site

This commit is contained in:
jeremystretch 2022-04-05 10:22:42 -04:00
parent a7fc8621a8
commit 0f5fe746e0

View File

@ -80,7 +80,14 @@
</tr>
<tr>
<th scope="row">AS Number</th>
<td>{{ object.asn|placeholder }}</td>
<td>
{% if object.asn %}
<div class="float-end text-warning">
<i class="mdi mdi-alert" title="This field will be removed in NetBox v3.2. Please migrate this data to ASN objects."></i>
</div>
{% endif %}
{{ object.asn|placeholder }}
</td>
</tr>
<tr>
<th scope="row">Time Zone</th>
@ -128,8 +135,7 @@
</td>
</tr>
{# 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 %}
{% with deprecation_warning="This field will be removed in NetBox v3.2. Please migrate this data to contact objects." %}
<tr>
<th scope="row">Contact Name</th>
<td>
@ -141,8 +147,6 @@
{{ object.contact_name|placeholder }}
</td>
</tr>
{% endif %}
{% if object.contact_phone %}
<tr>
<th scope="row">Contact Phone</th>
<td>
@ -156,8 +160,6 @@
{% endif %}
</td>
</tr>
{% endif %}
{% if object.contact_email %}
<tr>
<th scope="row">Contact E-Mail</th>
<td>
@ -171,7 +173,6 @@
{% endif %}
</td>
</tr>
{% endif %}
{% endwith %}
</table>
</div>