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>
<tr> <tr>
<th scope="row">AS Number</th> <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>
<tr> <tr>
<th scope="row">Time Zone</th> <th scope="row">Time Zone</th>
@ -128,8 +135,7 @@
</td> </td>
</tr> </tr>
{# Legacy contact fields #} {# Legacy contact fields #}
{% with deprecation_warning="This field will be removed in a future release. Please migrate this data to contact objects." %} {% with deprecation_warning="This field will be removed in NetBox v3.2. Please migrate this data to contact objects." %}
{% if object.contact_name %}
<tr> <tr>
<th scope="row">Contact Name</th> <th scope="row">Contact Name</th>
<td> <td>
@ -141,8 +147,6 @@
{{ object.contact_name|placeholder }} {{ object.contact_name|placeholder }}
</td> </td>
</tr> </tr>
{% endif %}
{% if object.contact_phone %}
<tr> <tr>
<th scope="row">Contact Phone</th> <th scope="row">Contact Phone</th>
<td> <td>
@ -156,8 +160,6 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
{% endif %}
{% if object.contact_email %}
<tr> <tr>
<th scope="row">Contact E-Mail</th> <th scope="row">Contact E-Mail</th>
<td> <td>
@ -171,7 +173,6 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
{% endif %}
{% endwith %} {% endwith %}
</table> </table>
</div> </div>