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

Closes #12246: General cleanup of utilities modules

* Clean up base modules

* Clean up forms modules

* Clean up templatetags modules

* Replace custom simplify_decimal filter with floatformat

* Misc cleanup

* Merge ReturnURLForm into ConfirmationForm

* Clean up import statements for utilities.forms

* Fix field class references in docs
This commit is contained in:
Jeremy Stretch
2023-04-14 10:33:53 -04:00
committed by GitHub
parent 59a6b3e71b
commit d470848b29
87 changed files with 585 additions and 406 deletions

View File

@@ -242,7 +242,7 @@
<th scope="row">Channel Frequency</th>
<td>
{% if object.rf_channel_frequency %}
{{ object.rf_channel_frequency|simplify_decimal }} MHz
{{ object.rf_channel_frequency|floatformat:"-2" }} MHz
{% else %}
{{ ''|placeholder }}
{% endif %}
@@ -250,7 +250,7 @@
{% if peer %}
<td{% if peer.rf_channel_frequency != object.rf_channel_frequency %} class="text-danger"{% endif %}>
{% if peer.rf_channel_frequency %}
{{ peer.rf_channel_frequency|simplify_decimal }} MHz
{{ peer.rf_channel_frequency|floatformat:"-2" }} MHz
{% else %}
{{ ''|placeholder }}
{% endif %}
@@ -261,7 +261,7 @@
<th scope="row">Channel Width</th>
<td>
{% if object.rf_channel_width %}
{{ object.rf_channel_width|simplify_decimal }} MHz
{{ object.rf_channel_width|floatformat:"-3" }} MHz
{% else %}
{{ ''|placeholder }}
{% endif %}
@@ -269,7 +269,7 @@
{% if peer %}
<td{% if peer.rf_channel_width != object.rf_channel_width %} class="text-danger"{% endif %}>
{% if peer.rf_channel_width %}
{{ peer.rf_channel_width|simplify_decimal }} MHz
{{ peer.rf_channel_width|floatformat:"-3" }} MHz
{% else %}
{{ ''|placeholder }}
{% endif %}