mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -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>
|
||||
<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,50 +135,44 @@
|
||||
</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 %}
|
||||
<tr>
|
||||
<th scope="row">Contact Name</th>
|
||||
<td>
|
||||
{% if object.contact_name %}
|
||||
<div class="float-end text-warning">
|
||||
<i class="mdi mdi-alert" title="{{ deprecation_warning }}"></i>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ object.contact_name|placeholder }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if object.contact_phone %}
|
||||
<tr>
|
||||
<th scope="row">Contact Phone</th>
|
||||
<td>
|
||||
{% if object.contact_phone %}
|
||||
<div class="float-end text-warning">
|
||||
<i class="mdi mdi-alert" title="{{ deprecation_warning }}"></i>
|
||||
</div>
|
||||
<a href="tel:{{ object.contact_phone }}">{{ object.contact_phone }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if object.contact_email %}
|
||||
<tr>
|
||||
<th scope="row">Contact E-Mail</th>
|
||||
<td>
|
||||
{% if object.contact_email %}
|
||||
<div class="float-end text-warning">
|
||||
<i class="mdi mdi-alert" title="{{ deprecation_warning }}"></i>
|
||||
</div>
|
||||
<a href="mailto:{{ object.contact_email }}">{{ object.contact_email }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% 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>
|
||||
{% if object.contact_name %}
|
||||
<div class="float-end text-warning">
|
||||
<i class="mdi mdi-alert" title="{{ deprecation_warning }}"></i>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ object.contact_name|placeholder }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Contact Phone</th>
|
||||
<td>
|
||||
{% if object.contact_phone %}
|
||||
<div class="float-end text-warning">
|
||||
<i class="mdi mdi-alert" title="{{ deprecation_warning }}"></i>
|
||||
</div>
|
||||
<a href="tel:{{ object.contact_phone }}">{{ object.contact_phone }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Contact E-Mail</th>
|
||||
<td>
|
||||
{% if object.contact_email %}
|
||||
<div class="float-end text-warning">
|
||||
<i class="mdi mdi-alert" title="{{ deprecation_warning }}"></i>
|
||||
</div>
|
||||
<a href="mailto:{{ object.contact_email }}">{{ object.contact_email }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endwith %}
|
||||
</table>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user