[PR #14841] [MERGED] Closes #14740: Remove BootstrapMixin #14469

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/14841
Author: @jeremystretch
Created: 1/18/2024
Status: Merged
Merged: 1/19/2024
Merged by: @jeremystretch

Base: featureHead: 14740-remove-bootstrapmixin


📝 Commits (8)

  • c2b0ac3 Introduce custom form widget templates to apply CSS classes
  • 06add63 Apply both mandatory and optional CSS classes to form widgets
  • 755da9f Omit required & placeholder attrs
  • 43a11dd Move annotation of field validation failures to CSS
  • ab54eb8 Remove BootstrapMixin class
  • 0a085fc Remove obsolete ComponentTemplateImportForm class
  • 27d3453 Remove obsolete custom forms for login & password change
  • 28ca4bc Clean up obsolete accommodations for 'required' widget attr

📊 Changes

33 files changed (+102 additions, -180 deletions)

View changed files

📝 netbox/account/views.py (+6 -6)
📝 netbox/circuits/forms/bulk_import.py (+1 -2)
📝 netbox/core/forms/model_forms.py (+2 -2)
📝 netbox/dcim/forms/bulk_create.py (+2 -2)
📝 netbox/dcim/forms/model_forms.py (+4 -4)
📝 netbox/dcim/forms/object_import.py (+10 -15)
📝 netbox/extras/dashboard/forms.py (+2 -2)
📝 netbox/extras/dashboard/widgets.py (+1 -2)
📝 netbox/extras/forms/model_forms.py (+11 -11)
📝 netbox/extras/forms/reports.py (+1 -2)
📝 netbox/extras/forms/scripts.py (+1 -2)
📝 netbox/ipam/forms/bulk_create.py (+1 -2)
📝 netbox/ipam/forms/model_forms.py (+3 -4)
📝 netbox/netbox/forms/__init__.py (+1 -2)
📝 netbox/netbox/forms/base.py (+4 -4)
📝 netbox/project-static/dist/netbox.css (+1 -1)
📝 netbox/project-static/styles/overrides/_slim-select.scss (+8 -10)
📝 netbox/project-static/styles/transitional/_forms.scss (+9 -0)
netbox/templates/django/forms/widgets/attrs.html (+2 -0)
📝 netbox/templates/django/forms/widgets/checkbox.html (+1 -1)

...and 13 more files

📄 Description

Closes: #14740

  • Introduces custom HTML templates for form widgets to handle the application of Bootstrap/Tabler CSS classes (e.g. form-control)
  • Removes the redundant application the required widget attribute for required form fields
  • Removes the application of the is-invalid CSS class for fields with errors & updates CSS to leverage the .has-errors class on the parent element
  • Completely removes the BootstrapMixin class
  • Removes now-obsolete child classes which existed only to inherit the mixin

🔄 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/14841 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 1/18/2024 **Status:** ✅ Merged **Merged:** 1/19/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `14740-remove-bootstrapmixin` --- ### 📝 Commits (8) - [`c2b0ac3`](https://github.com/netbox-community/netbox/commit/c2b0ac3d02cbe6fe1057a19cae7fe76f0897f677) Introduce custom form widget templates to apply CSS classes - [`06add63`](https://github.com/netbox-community/netbox/commit/06add63e8e14c471ffd2f9c96a954d7455192fb2) Apply both mandatory and optional CSS classes to form widgets - [`755da9f`](https://github.com/netbox-community/netbox/commit/755da9fd73145e51e5681f121cf0cc477e2acba6) Omit required & placeholder attrs - [`43a11dd`](https://github.com/netbox-community/netbox/commit/43a11ddce8501d19f331ead7fb01d2c0538fcd36) Move annotation of field validation failures to CSS - [`ab54eb8`](https://github.com/netbox-community/netbox/commit/ab54eb8598fb82f21045e12df8869116df133750) Remove BootstrapMixin class - [`0a085fc`](https://github.com/netbox-community/netbox/commit/0a085fce5394ab1418f9151571f5517009e4dbd5) Remove obsolete ComponentTemplateImportForm class - [`27d3453`](https://github.com/netbox-community/netbox/commit/27d3453f12cce9103f0b20b95652f8c919b19c76) Remove obsolete custom forms for login & password change - [`28ca4bc`](https://github.com/netbox-community/netbox/commit/28ca4bcf9d4b1c8088cdff27be4c57b2a6b5f39b) Clean up obsolete accommodations for 'required' widget attr ### 📊 Changes **33 files changed** (+102 additions, -180 deletions) <details> <summary>View changed files</summary> 📝 `netbox/account/views.py` (+6 -6) 📝 `netbox/circuits/forms/bulk_import.py` (+1 -2) 📝 `netbox/core/forms/model_forms.py` (+2 -2) 📝 `netbox/dcim/forms/bulk_create.py` (+2 -2) 📝 `netbox/dcim/forms/model_forms.py` (+4 -4) 📝 `netbox/dcim/forms/object_import.py` (+10 -15) 📝 `netbox/extras/dashboard/forms.py` (+2 -2) 📝 `netbox/extras/dashboard/widgets.py` (+1 -2) 📝 `netbox/extras/forms/model_forms.py` (+11 -11) 📝 `netbox/extras/forms/reports.py` (+1 -2) 📝 `netbox/extras/forms/scripts.py` (+1 -2) 📝 `netbox/ipam/forms/bulk_create.py` (+1 -2) 📝 `netbox/ipam/forms/model_forms.py` (+3 -4) 📝 `netbox/netbox/forms/__init__.py` (+1 -2) 📝 `netbox/netbox/forms/base.py` (+4 -4) 📝 `netbox/project-static/dist/netbox.css` (+1 -1) 📝 `netbox/project-static/styles/overrides/_slim-select.scss` (+8 -10) 📝 `netbox/project-static/styles/transitional/_forms.scss` (+9 -0) ➕ `netbox/templates/django/forms/widgets/attrs.html` (+2 -0) 📝 `netbox/templates/django/forms/widgets/checkbox.html` (+1 -1) _...and 13 more files_ </details> ### 📄 Description ### Closes: #14740 - Introduces custom HTML templates for form widgets to handle the application of Bootstrap/Tabler CSS classes (e.g. `form-control`) - Removes the redundant application the `required` widget attribute for required form fields - Removes the application of the `is-invalid` CSS class for fields with errors & updates CSS to leverage the `.has-errors` class on the parent element - Completely removes the BootstrapMixin class - Removes now-obsolete child classes which existed only to inherit the mixin --- <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:24:39 +01:00
adam closed this issue 2025-12-29 23:24:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14469