mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-25 01:48:38 -06:00
Add warning for legacy ASN field on site
This commit is contained in:
parent
a7fc8621a8
commit
0f5fe746e0
@ -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,50 +135,44 @@
|
|||||||
</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>
|
{% if object.contact_name %}
|
||||||
{% if object.contact_name %}
|
<div class="float-end text-warning">
|
||||||
<div class="float-end text-warning">
|
<i class="mdi mdi-alert" title="{{ deprecation_warning }}"></i>
|
||||||
<i class="mdi mdi-alert" title="{{ deprecation_warning }}"></i>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
{% endif %}
|
{{ object.contact_name|placeholder }}
|
||||||
{{ object.contact_name|placeholder }}
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
{% endif %}
|
<th scope="row">Contact Phone</th>
|
||||||
{% if object.contact_phone %}
|
<td>
|
||||||
<tr>
|
{% if object.contact_phone %}
|
||||||
<th scope="row">Contact Phone</th>
|
<div class="float-end text-warning">
|
||||||
<td>
|
<i class="mdi mdi-alert" title="{{ deprecation_warning }}"></i>
|
||||||
{% if object.contact_phone %}
|
</div>
|
||||||
<div class="float-end text-warning">
|
<a href="tel:{{ object.contact_phone }}">{{ object.contact_phone }}</a>
|
||||||
<i class="mdi mdi-alert" title="{{ deprecation_warning }}"></i>
|
{% else %}
|
||||||
</div>
|
<span class="text-muted">—</span>
|
||||||
<a href="tel:{{ object.contact_phone }}">{{ object.contact_phone }}</a>
|
{% endif %}
|
||||||
{% else %}
|
</td>
|
||||||
<span class="text-muted">—</span>
|
</tr>
|
||||||
{% endif %}
|
<tr>
|
||||||
</td>
|
<th scope="row">Contact E-Mail</th>
|
||||||
</tr>
|
<td>
|
||||||
{% endif %}
|
{% if object.contact_email %}
|
||||||
{% if object.contact_email %}
|
<div class="float-end text-warning">
|
||||||
<tr>
|
<i class="mdi mdi-alert" title="{{ deprecation_warning }}"></i>
|
||||||
<th scope="row">Contact E-Mail</th>
|
</div>
|
||||||
<td>
|
<a href="mailto:{{ object.contact_email }}">{{ object.contact_email }}</a>
|
||||||
{% if object.contact_email %}
|
{% else %}
|
||||||
<div class="float-end text-warning">
|
<span class="text-muted">—</span>
|
||||||
<i class="mdi mdi-alert" title="{{ deprecation_warning }}"></i>
|
{% endif %}
|
||||||
</div>
|
</td>
|
||||||
<a href="mailto:{{ object.contact_email }}">{{ object.contact_email }}</a>
|
</tr>
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user