Fix CheckboxesWidget and RadioWidget style #403
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reasons for making this change
Unfortunately I currently don't have time for the 'bigger' issues, but this is a simple style fix I think will make many forms look better.
Some context:
The label in a
CheckboxWidget
is bold, and rightly so, because the label of aCheckboxWidget
is the field title and all field titles are bold. The labels in aRadioWidget
are not bold, unless the optioninline: true
is set.Issue 1:
The labels in the
CheckboxesWidget
are bold too. I think this is done for consistency withCheckboxWidget
, but I think consistency withRadioWidget
would be better, because the labels of aCheckboxesWidget
are not titles butenumNames
. Now it could lead to an enormous wall of bold text for largeenum
s, and the real field title does not stand out any more. I changed this in this pull request.Issue 2:
The labels in
RadioWidget
andCheckboxesWidget
were bold wheninline: true
was set. This was due to a styling issue with Bootstrap, which needs another DOM structure for inline widgets (classradio-inline
orcheckbox-inline
must be set on<label>
itself instead of on a wrapper<div>
). I fixed this too.Issue 3:
While I was working on it, I saw that in
CheckboxesWidget
thedisabled
class was not set for disabled inputs. I fixed this like it was done forCheckboxWidget
andRadioWidget
.Checklist