Skip to content
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

RadioField renders render_kw #688

Merged
merged 4 commits into from
May 19, 2021

Conversation

azmeuk
Copy link
Member

@azmeuk azmeuk commented Apr 27, 2021

This pull request comes after the accidental closing of #628 and fixes #490. I cherry-picked the commits of #628 so the author is remembered.

Basically this patch renders the RadioField render_kw parameter in both the generated <ul> tag, and the <input type="radio"> tags inside. Before it was rendered only in <ul> and not in the <input>.

Passing disabled=True in the render_kw will keep adding a disabled parameter in <ul>. This may look wrong but this is harmless and not worse than before.

I am not sure how to improve this. For instance, how to ventilate render_kw items so some are displayed in <ul> and other in <input>? What about class, should this be rendered in both?

I think the situation is still unsatisfying with this patch, but at least it goes in the right direction. It is a good-enough PR in my opinion.

What do you think?

@azmeuk azmeuk force-pushed the issue-490-radiofield-kwargs branch from 362a901 to 0bca606 Compare April 27, 2021 21:08
@azmeuk
Copy link
Member Author

azmeuk commented Apr 27, 2021

Maybe we could only display in <ul> the attributes that are part of the HTML Global Attributes.

@azmeuk azmeuk added the bug Unexpected behavior label Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected behavior
Development

Successfully merging this pull request may close these issues.

Field render kwargs are not populated to the inputs of RadioField
2 participants