1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #7748: Remove legacy contact fields from site model

This commit is contained in:
jeremystretch
2021-12-09 16:20:24 -05:00
parent 8680981990
commit d2d2978288
11 changed files with 45 additions and 97 deletions

View File

@@ -127,52 +127,6 @@
{% endif %}
</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">&mdash;</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">&mdash;</span>
{% endif %}
</td>
</tr>
{% endif %}
{% endwith %}
</table>
</div>
</div>