forms: add item options for radio buttons (#48678)
gitea-wip/wcs/pipeline/head Build started... Details
gitea/wcs/pipeline/head Build queued... Details

This commit is contained in:
Serghei Mihai 2020-11-19 12:06:02 +01:00
parent aef73540c0
commit a364e2015c
1 changed files with 3 additions and 2 deletions

View File

@ -262,12 +262,13 @@ class RadiobuttonsWidget(quixote.form.RadiobuttonsWidget):
def get_options(self):
options = self.options_with_attributes or self.options
for i, option in enumerate(options):
object, description, key = option[:3]
object, description, key, options = option[:4]
yield {
'value': key,
'label': description,
'disabled': bool(self.options_with_attributes and option[-1].get('disabled')),
'selected': self.is_selected(object)
'selected': self.is_selected(object),
'options': options
}