[PR #19991] [MERGED] Closes #19968: Use multiple selection lists for the assignment of object types when editing a permission #15781

Closed
opened 2025-12-30 00:24:02 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19991
Author: @jeremystretch
Created: 7/31/2025
Status: Merged
Merged: 8/1/2025
Merged by: @jnovinger

Base: mainHead: 19968-permissions-form-widget


📝 Commits (4)

  • 5b18d88 Closes #19968: Use multiple selection lists for the assignment of object types when editing a permission
  • 5cf8dc4 Remove errant logging statements
  • 5d08a80 Defer compilation of choices for object_types
  • 79d7e42 Fix test data

📊 Changes

9 files changed (+172 additions, -28 deletions)

View changed files

📝 netbox/project-static/dist/netbox.js (+4 -4)
📝 netbox/project-static/dist/netbox.js.map (+3 -3)
📝 netbox/project-static/src/buttons/moveOptions.ts (+38 -11)
📝 netbox/templates/extras/tableconfig_edit.html (+2 -2)
📝 netbox/users/forms/model_forms.py (+12 -3)
📝 netbox/users/tests/test_views.py (+1 -1)
📝 netbox/utilities/forms/widgets/select.py (+77 -0)
📝 netbox/utilities/templates/helpers/table_config_form.html (+4 -4)
netbox/utilities/templates/widgets/splitmultiselect.html (+31 -0)

📄 Description

Closes: #19968

  • Introduced SplitMultiSelectWidget to render side-by-side multi-select widgets (one for available choices and one for selected choices)
    • Also introduced the AvailableOptions and SelectedOptions subwidgets, which are not intended for general use
  • Update and extend TypeScript to support moving options between the two widgets
  • Changed the object_types field on ObjectPermissionForm to use SplitMultiSelectWidget
  • Updated the table configuration form templates to work with the updated TypeScript

🔄 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/19991 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 7/31/2025 **Status:** ✅ Merged **Merged:** 8/1/2025 **Merged by:** [@jnovinger](https://github.com/jnovinger) **Base:** `main` ← **Head:** `19968-permissions-form-widget` --- ### 📝 Commits (4) - [`5b18d88`](https://github.com/netbox-community/netbox/commit/5b18d88db0bb9111c5efa89eb08d3dd3d077f939) Closes #19968: Use multiple selection lists for the assignment of object types when editing a permission - [`5cf8dc4`](https://github.com/netbox-community/netbox/commit/5cf8dc44bab3c726496ac7dd7fa490f0ada52664) Remove errant logging statements - [`5d08a80`](https://github.com/netbox-community/netbox/commit/5d08a80c9e4551ebabdcb476707d9df09e3c052a) Defer compilation of choices for object_types - [`79d7e42`](https://github.com/netbox-community/netbox/commit/79d7e427f598b111cb59154b575df8c00b87a446) Fix test data ### 📊 Changes **9 files changed** (+172 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `netbox/project-static/dist/netbox.js` (+4 -4) 📝 `netbox/project-static/dist/netbox.js.map` (+3 -3) 📝 `netbox/project-static/src/buttons/moveOptions.ts` (+38 -11) 📝 `netbox/templates/extras/tableconfig_edit.html` (+2 -2) 📝 `netbox/users/forms/model_forms.py` (+12 -3) 📝 `netbox/users/tests/test_views.py` (+1 -1) 📝 `netbox/utilities/forms/widgets/select.py` (+77 -0) 📝 `netbox/utilities/templates/helpers/table_config_form.html` (+4 -4) ➕ `netbox/utilities/templates/widgets/splitmultiselect.html` (+31 -0) </details> ### 📄 Description ### Closes: #19968 - Introduced SplitMultiSelectWidget to render side-by-side multi-select widgets (one for available choices and one for selected choices) - Also introduced the AvailableOptions and SelectedOptions subwidgets, which are not intended for general use - Update and extend TypeScript to support moving options between the two widgets - Changed the `object_types` field on ObjectPermissionForm to use SplitMultiSelectWidget - Updated the table configuration form templates to work with the updated TypeScript --- <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-30 00:24:02 +01:00
adam closed this issue 2025-12-30 00:24:03 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15781