From f39447698e14120889829820b7ec2077818667b0 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 9 Jan 2024 16:56:09 -0500 Subject: [PATCH] Standardize ordering & styling of action buttons --- netbox/templates/account/password.html | 2 +- netbox/templates/account/preferences.html | 2 +- netbox/templates/core/configrevision_restore.html | 2 +- netbox/templates/dcim/devicebay_populate.html | 2 +- .../templates/dcim/virtualchassis_add_member.html | 6 ++++-- netbox/templates/dcim/virtualchassis_edit.html | 2 +- netbox/templates/extras/object_journal.html | 2 +- netbox/templates/extras/script.html | 2 +- netbox/templates/generic/bulk_add_component.html | 2 +- netbox/templates/generic/bulk_delete.html | 2 +- netbox/templates/generic/bulk_edit.html | 2 +- netbox/templates/generic/bulk_import.html | 12 ++++++------ netbox/templates/generic/bulk_remove.html | 4 ++-- netbox/templates/generic/bulk_rename.html | 2 +- netbox/templates/generic/confirmation_form.html | 2 +- netbox/templates/generic/object_edit.html | 14 ++++++++------ netbox/templates/ipam/ipaddress_assign.html | 2 +- .../virtualization/cluster_add_devices.html | 2 +- 18 files changed, 34 insertions(+), 30 deletions(-) diff --git a/netbox/templates/account/password.html b/netbox/templates/account/password.html index 055be4879..4a2cf640f 100644 --- a/netbox/templates/account/password.html +++ b/netbox/templates/account/password.html @@ -14,7 +14,7 @@ {% render_field form.new_password2 %}
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/netbox/templates/account/preferences.html b/netbox/templates/account/preferences.html index f63a4c8c7..93ca5dfc2 100644 --- a/netbox/templates/account/preferences.html +++ b/netbox/templates/account/preferences.html @@ -79,7 +79,7 @@
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/netbox/templates/core/configrevision_restore.html b/netbox/templates/core/configrevision_restore.html index ad6fb1bd9..2b3803d84 100644 --- a/netbox/templates/core/configrevision_restore.html +++ b/netbox/templates/core/configrevision_restore.html @@ -77,7 +77,7 @@
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/netbox/templates/dcim/devicebay_populate.html b/netbox/templates/dcim/devicebay_populate.html index 6d1b81a85..b6e7a6560 100644 --- a/netbox/templates/dcim/devicebay_populate.html +++ b/netbox/templates/dcim/devicebay_populate.html @@ -31,7 +31,7 @@
diff --git a/netbox/templates/dcim/virtualchassis_add_member.html b/netbox/templates/dcim/virtualchassis_add_member.html index ceb2c71b3..e4156ec50 100644 --- a/netbox/templates/dcim/virtualchassis_add_member.html +++ b/netbox/templates/dcim/virtualchassis_add_member.html @@ -21,9 +21,11 @@
- {% trans "Cancel" %} - + {% trans "Cancel" %} +
+ +
{% endblock %} diff --git a/netbox/templates/dcim/virtualchassis_edit.html b/netbox/templates/dcim/virtualchassis_edit.html index 7271ce7d8..d9a698591 100644 --- a/netbox/templates/dcim/virtualchassis_edit.html +++ b/netbox/templates/dcim/virtualchassis_edit.html @@ -100,7 +100,7 @@
- {% trans "Cancel" %} + {% trans "Cancel" %} {% if vc_form.instance.pk %} {% else %} diff --git a/netbox/templates/extras/object_journal.html b/netbox/templates/extras/object_journal.html index 7b23772a6..1b775b7f5 100644 --- a/netbox/templates/extras/object_journal.html +++ b/netbox/templates/extras/object_journal.html @@ -23,7 +23,7 @@ {% render_form form %}
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/netbox/templates/extras/script.html b/netbox/templates/extras/script.html index 9aa606dc3..05b285bf5 100644 --- a/netbox/templates/extras/script.html +++ b/netbox/templates/extras/script.html @@ -33,7 +33,7 @@ {% endfor %}
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/netbox/templates/generic/bulk_add_component.html b/netbox/templates/generic/bulk_add_component.html index 6482496d7..5bd1d4a75 100644 --- a/netbox/templates/generic/bulk_add_component.html +++ b/netbox/templates/generic/bulk_add_component.html @@ -50,7 +50,7 @@
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/netbox/templates/generic/bulk_delete.html b/netbox/templates/generic/bulk_delete.html index 21894a31b..6015747d0 100644 --- a/netbox/templates/generic/bulk_delete.html +++ b/netbox/templates/generic/bulk_delete.html @@ -56,8 +56,8 @@ Context: {{ field }} {% endfor %}
+ {% trans "Cancel" %} - {% trans "Cancel" %}
diff --git a/netbox/templates/generic/bulk_edit.html b/netbox/templates/generic/bulk_edit.html index 5505218ef..b762f33dd 100644 --- a/netbox/templates/generic/bulk_edit.html +++ b/netbox/templates/generic/bulk_edit.html @@ -113,8 +113,8 @@ Context: {% endif %}
+ {% trans "Cancel" %} - {% trans "Cancel" %}
diff --git a/netbox/templates/generic/bulk_import.html b/netbox/templates/generic/bulk_import.html index a5825ca97..6ec135d82 100644 --- a/netbox/templates/generic/bulk_import.html +++ b/netbox/templates/generic/bulk_import.html @@ -47,10 +47,10 @@ Context: {% render_field form.csv_delimiter %}
- {% if return_url %} - {% trans "Cancel" %} + {% trans "Cancel" %} {% endif %} +
@@ -69,10 +69,10 @@ Context: {% render_field form.csv_delimiter %}
- {% if return_url %} - {% trans "Cancel" %} + {% trans "Cancel" %} {% endif %} +
@@ -91,10 +91,10 @@ Context: {% render_field form.csv_delimiter %}
- {% if return_url %} - {% trans "Cancel" %} + {% trans "Cancel" %} {% endif %} +
diff --git a/netbox/templates/generic/bulk_remove.html b/netbox/templates/generic/bulk_remove.html index 0c76897db..a1412849f 100644 --- a/netbox/templates/generic/bulk_remove.html +++ b/netbox/templates/generic/bulk_remove.html @@ -33,13 +33,13 @@ {% for field in form.hidden_fields %} {{ field }} {% endfor %} -
+
+ {% trans "Cancel" %} - {% trans "Cancel" %}
diff --git a/netbox/templates/generic/bulk_rename.html b/netbox/templates/generic/bulk_rename.html index 6b7af6789..751039e52 100644 --- a/netbox/templates/generic/bulk_rename.html +++ b/netbox/templates/generic/bulk_rename.html @@ -37,11 +37,11 @@
+ {% trans "Cancel" %} {% if '_preview' in request.POST and not form.errors %} {% endif %} - {% trans "Cancel" %}
diff --git a/netbox/templates/generic/confirmation_form.html b/netbox/templates/generic/confirmation_form.html index 14a36a61e..88c37867b 100644 --- a/netbox/templates/generic/confirmation_form.html +++ b/netbox/templates/generic/confirmation_form.html @@ -16,8 +16,8 @@ {% block message %}

{% trans "Are you sure" %}?

{% endblock %} diff --git a/netbox/templates/generic/object_edit.html b/netbox/templates/generic/object_edit.html index ecc24121c..e1d04c4ff 100644 --- a/netbox/templates/generic/object_edit.html +++ b/netbox/templates/generic/object_edit.html @@ -70,12 +70,14 @@ Context: {% trans "Save" %} {% else %} - - +
+ + +
{% endif %} {% endblock buttons %} diff --git a/netbox/templates/ipam/ipaddress_assign.html b/netbox/templates/ipam/ipaddress_assign.html index 585281857..4ddd19941 100644 --- a/netbox/templates/ipam/ipaddress_assign.html +++ b/netbox/templates/ipam/ipaddress_assign.html @@ -28,7 +28,7 @@
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/netbox/templates/virtualization/cluster_add_devices.html b/netbox/templates/virtualization/cluster_add_devices.html index 38d3655d3..725fce4de 100644 --- a/netbox/templates/virtualization/cluster_add_devices.html +++ b/netbox/templates/virtualization/cluster_add_devices.html @@ -27,7 +27,7 @@
- {% trans "Cancel" %} + {% trans "Cancel" %}