From b1a810164a42e467d7a84caf043a6f5e2f369c45 Mon Sep 17 00:00:00 2001 From: Martin Hauser Date: Wed, 22 Apr 2026 19:41:21 +0200 Subject: [PATCH] fix(dcim): Add color field to FrontPort form Include the color field in FrontPortForm and commented-out FrontPortBulkCreateForm field lists to allow editing front port colors via the UI. Fixes #21985 --- netbox/dcim/forms/bulk_create.py | 2 +- netbox/dcim/forms/model_forms.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/dcim/forms/bulk_create.py b/netbox/dcim/forms/bulk_create.py index bfa492111..a95a80f63 100644 --- a/netbox/dcim/forms/bulk_create.py +++ b/netbox/dcim/forms/bulk_create.py @@ -94,7 +94,7 @@ class InterfaceBulkCreateForm( # class FrontPortBulkCreateForm( -# form_from_model(FrontPort, ['label', 'type', 'description', 'tags']), +# form_from_model(FrontPort, ['label', 'type', 'color', 'description', 'tags']), # DeviceBulkAddComponentForm # ): # pass diff --git a/netbox/dcim/forms/model_forms.py b/netbox/dcim/forms/model_forms.py index b2b013b80..9f3a6de63 100644 --- a/netbox/dcim/forms/model_forms.py +++ b/netbox/dcim/forms/model_forms.py @@ -1166,7 +1166,7 @@ class FrontPortTemplateForm(FrontPortFormMixin, ModularComponentTemplateForm): FieldSet('device_type', name=_('Device Type')), FieldSet('module_type', name=_('Module Type')), ), - 'name', 'label', 'type', 'positions', 'rear_ports', 'description', + 'name', 'label', 'type', 'color', 'positions', 'rear_ports', 'description', ), )