Commit e28a1c59 authored by Paul Brown's avatar Paul Brown

Merge pull request #1142 from iurisilvio/translate_editable_boolean

Friendly choices for editable boolean field.
parents c3f76404 5b5c6632
......@@ -109,7 +109,10 @@ class XEditableWidget(object):
elif subfield.type == 'BooleanField':
kwargs['data-type'] = 'select'
# data-source = dropdown options
kwargs['data-source'] = {'': 'False', '1': 'True'}
kwargs['data-source'] = json.dumps([
{'value': '', 'text': gettext('No')},
{'value': '1', 'text': gettext('Yes')}
])
kwargs['data-role'] = 'x-editable-boolean'
elif subfield.type == 'Select2Field':
kwargs['data-type'] = 'select'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment