From 46a3ce2559eb38c5bd5f107855d591754489e7b3 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 22 Apr 2025 14:07:03 -0400 Subject: [PATCH] Fixes #19268: Restore editing conflict protection for several object forms (#19271) --- netbox/templates/dcim/cable_edit.html | 2 +- netbox/templates/dcim/device_edit.html | 4 +++- netbox/templates/dcim/htmx/cable_edit.html | 3 +++ netbox/templates/dcim/virtualchassis_add.html | 4 ++++ netbox/templates/dcim/virtualchassis_edit.html | 4 ++++ netbox/templates/ipam/vlan_edit.html | 4 ++++ 6 files changed, 19 insertions(+), 2 deletions(-) diff --git a/netbox/templates/dcim/cable_edit.html b/netbox/templates/dcim/cable_edit.html index fbe877d87..dd0d2f9c5 100644 --- a/netbox/templates/dcim/cable_edit.html +++ b/netbox/templates/dcim/cable_edit.html @@ -1,5 +1,5 @@ {% extends 'generic/object_edit.html' %} {% block form %} - {% include 'dcim/htmx/cable_edit.html' %} + {% include 'dcim/htmx/cable_edit.html' %} {% endblock %} diff --git a/netbox/templates/dcim/device_edit.html b/netbox/templates/dcim/device_edit.html index fcf1494b7..8ae98c201 100644 --- a/netbox/templates/dcim/device_edit.html +++ b/netbox/templates/dcim/device_edit.html @@ -3,7 +3,9 @@ {% load i18n %} {% block form %} - {% render_errors form %} + {% for field in form.hidden_fields %} + {{ field }} + {% endfor %}
diff --git a/netbox/templates/dcim/htmx/cable_edit.html b/netbox/templates/dcim/htmx/cable_edit.html index 6bb4af973..46a6c4e58 100644 --- a/netbox/templates/dcim/htmx/cable_edit.html +++ b/netbox/templates/dcim/htmx/cable_edit.html @@ -3,6 +3,9 @@ {% load form_helpers %} {% load i18n %} +{% for field in form.hidden_fields %} + {{ field }} +{% endfor %} {# A side termination #}
diff --git a/netbox/templates/dcim/virtualchassis_add.html b/netbox/templates/dcim/virtualchassis_add.html index d2108fa34..832671a61 100644 --- a/netbox/templates/dcim/virtualchassis_add.html +++ b/netbox/templates/dcim/virtualchassis_add.html @@ -3,6 +3,10 @@ {% load i18n %} {% block form %} + {% for field in form.hidden_fields %} + {{ field }} + {% endfor %} +

{% trans "Virtual Chassis" %}

diff --git a/netbox/templates/dcim/virtualchassis_edit.html b/netbox/templates/dcim/virtualchassis_edit.html index 9cc1bb753..29f5cac53 100644 --- a/netbox/templates/dcim/virtualchassis_edit.html +++ b/netbox/templates/dcim/virtualchassis_edit.html @@ -12,11 +12,15 @@ {% block content %}
+ {% render_errors vc_form %} {% for form in formset %} {% render_errors form %} {% endfor %} {% csrf_token %} + {% for field in vc_form.hidden_fields %} + {{ field }} + {% endfor %} {{ pk_form.pk }} {{ formset.management_form }}
diff --git a/netbox/templates/ipam/vlan_edit.html b/netbox/templates/ipam/vlan_edit.html index 885844580..53f5e02c4 100644 --- a/netbox/templates/ipam/vlan_edit.html +++ b/netbox/templates/ipam/vlan_edit.html @@ -5,6 +5,10 @@ {% load i18n %} {% block form %} + {% for field in form.hidden_fields %} + {{ field }} + {% endfor %} +

{% trans "VLAN" %}