fix error block location in radio buttons

Currently, radio widget error messages appear between the final checkbox and the final label.  Instead, use CheckboxesWidget's invisible input method to display errors on radio widgets.
This commit is contained in:
Tim Nyborg
2019-06-17 12:13:15 +01:00
committed by GitHub
parent 14c1b3e400
commit 2e8a8a62f9

View File

@@ -461,7 +461,12 @@ class RadioWidget(OptionsWidget):
opts.append(child(tds))
if opts:
opts[-1][0][0]['hideerror'] = False
opts.append(
INPUT(requires=attr.get('requires', None),
_style="display:none;",
_disabled="disabled",
_name=field.name,
hideerror=False))
return parent(*opts, **attr)