-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.6.4 Regression rendering hidden input for checkbox breaks forms.BooleanField in Filters #16293
Comments
I suspect it was introduced by a46255d So I can't say why I'm not seeing this in 3.7.x then - maybe plug-ins pick up the upstream Django template, and not the Netbox vendored version, and now this is no longer the case in 4.x. |
Ah-ha! I don't see it in plug-ins as they are fudging the UI because of this bug. |
Arbitrarily modifying core code does not constitute a valid bug report. Please modify your post above to describe the specific behavior in NetBox you believe is unintentional. |
It presents - in a bite-size example - code that already exists in plugins that "NetBox Cloud and NetBox Enterprise include commercial support for..." are doing, and NetBox is breaking them by injecting bad html for this field type. There already one hacky condition in the template because some other part of NetBox got broke by it.
If this was instead something along the lines of
Then that would resolve the issue - if I correctly understand the original intention for introducing this hidden input field. |
@ibuclaw the code you reference was added intentionally and serves a purpose. If you would like to propose an alternative solution, please submit a feature request citing the detailed proposal and justification for the change. I'm closing this issue as it does not identify unexpected, reproducible behavior in NetBox itself. |
Deployment Type
Self-hosted
NetBox Version
v4.0.3
Python Version
3.11
Steps to Reproduce
forms.BooleanField
parameter to a Filters form, e.g:/dcim/sites/
->Filters
Expected Behavior
NetBox 3.7 rendered this as something like:
Observed Behavior
There is a
hidden
input with the same name that did not exist in 3.7.x.As far as I can tell, this means
BooleanField
's are ignored due to this GET event listener deleting all form data for it, because the "hidden" input has an empty value.netbox/netbox/project-static/src/netbox.ts
Lines 44 to 47 in 103c08c
The text was updated successfully, but these errors were encountered: