[PR #15415] [MERGED] Closes #14739: Advanced form fieldset functionality #14586

Closed
opened 2025-12-29 23:25:21 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15415
Author: @jeremystretch
Created: 3/12/2024
Status: Merged
Merged: 3/19/2024
Merged by: @jeremystretch

Base: featureHead: 14739-form-fieldsets


📝 Commits (10+)

  • 2dc460c Introduce InlineFields for rendering fields side-by-side
  • 1d54356 Enable tabbed group fields in fieldsets
  • 96cf792 Ignore fields which are not included on the form (dynamic rendering)
  • f91aa32 Introduce ObjectAttribute for displaying read-only instance attributes on forms
  • 36bbcb2 Replace custom form templates with TabbedFieldGroups
  • 41d9aa4 Refactor form rendering components & add docstrings
  • 518c141 Use FieldSet instances for all forms
  • 471b842 Use render_fieldset() for bulk edit & filter forms
  • 6ddd5d3 Add form rendering utilities to plugins dev docs
  • d939c7f Misc cleanup & documentation for FieldSets

📊 Changes

56 files changed (+1085 additions, -1383 deletions)

View changed files

📝 docs/development/internationalization.md (+3 -2)
📝 docs/plugins/development/forms.md (+27 -12)
📝 netbox/circuits/forms/bulk_edit.py (+8 -7)
📝 netbox/circuits/forms/filtersets.py (+17 -16)
📝 netbox/circuits/forms/model_forms.py (+19 -8)
📝 netbox/circuits/views.py (+0 -1)
📝 netbox/core/forms/bulk_edit.py (+2 -1)
📝 netbox/core/forms/filtersets.py (+12 -11)
📝 netbox/core/forms/model_forms.py (+22 -15)
📝 netbox/dcim/forms/bulk_edit.py (+58 -55)
📝 netbox/dcim/forms/filtersets.py (+133 -125)
📝 netbox/dcim/forms/model_forms.py (+109 -91)
📝 netbox/dcim/forms/object_create.py (+4 -3)
📝 netbox/dcim/views.py (+0 -3)
📝 netbox/extras/forms/filtersets.py (+35 -34)
📝 netbox/extras/forms/model_forms.py (+42 -29)
📝 netbox/extras/views.py (+0 -1)
📝 netbox/ipam/forms/bulk_edit.py (+23 -20)
📝 netbox/ipam/forms/filtersets.py (+50 -43)
📝 netbox/ipam/forms/model_forms.py (+78 -31)

...and 36 more files

📄 Description

Closes: #14739

  • Introduces ObjectAttribute to display read-only object attributes on a form
  • Introduces InlineFields to lay out multiple fields side-by-side
  • Introduces TabbedFieldGroups to organize fields within tabs
  • Define fieldsets on the following forms & remove their custom templates:
    • circuits.CircuitTerminationForm
    • dcim.InventoryItemForm
    • dcim.RackForm
    • extras.ImageAttachmentForm
    • ipam.FHRPGroupAssignmentForm
    • ipam.IPAddressForm
    • ipam.ServiceForm
    • ipam.ServiceCreateForm
    • ipam.VLANForm
    • tenancy.ContactAssignmentForm
    • vpn.L2VPNTerminationForm

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/15415 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 3/12/2024 **Status:** ✅ Merged **Merged:** 3/19/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `14739-form-fieldsets` --- ### 📝 Commits (10+) - [`2dc460c`](https://github.com/netbox-community/netbox/commit/2dc460c327a56fc776168f6046465389a788f05a) Introduce InlineFields for rendering fields side-by-side - [`1d54356`](https://github.com/netbox-community/netbox/commit/1d54356641e19613ba6d2b5bd784303be0fd620e) Enable tabbed group fields in fieldsets - [`96cf792`](https://github.com/netbox-community/netbox/commit/96cf792b21c77c4dfec4af310bd5d7fbf8bb132d) Ignore fields which are not included on the form (dynamic rendering) - [`f91aa32`](https://github.com/netbox-community/netbox/commit/f91aa321bbdab258337bc15a561016d8edbeb14b) Introduce ObjectAttribute for displaying read-only instance attributes on forms - [`36bbcb2`](https://github.com/netbox-community/netbox/commit/36bbcb2bda60f3ff02b97a9bdbce54d83b4f3aeb) Replace custom form templates with TabbedFieldGroups - [`41d9aa4`](https://github.com/netbox-community/netbox/commit/41d9aa44d0ac36db038d72f0ecdf38cd74ea0e33) Refactor form rendering components & add docstrings - [`518c141`](https://github.com/netbox-community/netbox/commit/518c14177b2c6ac4354cd19bc880ed5e3775b05d) Use FieldSet instances for all forms - [`471b842`](https://github.com/netbox-community/netbox/commit/471b8425ebba24ac14583fcb7eb809197ace2936) Use render_fieldset() for bulk edit & filter forms - [`6ddd5d3`](https://github.com/netbox-community/netbox/commit/6ddd5d30ba5c7e0bd7d6c1a9a7a797d2e77837c2) Add form rendering utilities to plugins dev docs - [`d939c7f`](https://github.com/netbox-community/netbox/commit/d939c7fb6f6d425a755164e1633e1f7ea813d4cb) Misc cleanup & documentation for FieldSets ### 📊 Changes **56 files changed** (+1085 additions, -1383 deletions) <details> <summary>View changed files</summary> 📝 `docs/development/internationalization.md` (+3 -2) 📝 `docs/plugins/development/forms.md` (+27 -12) 📝 `netbox/circuits/forms/bulk_edit.py` (+8 -7) 📝 `netbox/circuits/forms/filtersets.py` (+17 -16) 📝 `netbox/circuits/forms/model_forms.py` (+19 -8) 📝 `netbox/circuits/views.py` (+0 -1) 📝 `netbox/core/forms/bulk_edit.py` (+2 -1) 📝 `netbox/core/forms/filtersets.py` (+12 -11) 📝 `netbox/core/forms/model_forms.py` (+22 -15) 📝 `netbox/dcim/forms/bulk_edit.py` (+58 -55) 📝 `netbox/dcim/forms/filtersets.py` (+133 -125) 📝 `netbox/dcim/forms/model_forms.py` (+109 -91) 📝 `netbox/dcim/forms/object_create.py` (+4 -3) 📝 `netbox/dcim/views.py` (+0 -3) 📝 `netbox/extras/forms/filtersets.py` (+35 -34) 📝 `netbox/extras/forms/model_forms.py` (+42 -29) 📝 `netbox/extras/views.py` (+0 -1) 📝 `netbox/ipam/forms/bulk_edit.py` (+23 -20) 📝 `netbox/ipam/forms/filtersets.py` (+50 -43) 📝 `netbox/ipam/forms/model_forms.py` (+78 -31) _...and 36 more files_ </details> ### 📄 Description ### Closes: #14739 - Introduces `ObjectAttribute` to display read-only object attributes on a form - Introduces `InlineFields` to lay out multiple fields side-by-side - Introduces `TabbedFieldGroups` to organize fields within tabs - Define `fieldsets` on the following forms & remove their custom templates: - `circuits.CircuitTerminationForm` - `dcim.InventoryItemForm` - `dcim.RackForm` - `extras.ImageAttachmentForm` - `ipam.FHRPGroupAssignmentForm` - `ipam.IPAddressForm` - `ipam.ServiceForm` - `ipam.ServiceCreateForm` - `ipam.VLANForm` - `tenancy.ContactAssignmentForm` - `vpn.L2VPNTerminationForm` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:25:21 +01:00
adam closed this issue 2025-12-29 23:25:21 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14586