widgets: add template name to let checkbox widgets be overridden (#22403)
This commit is contained in:
parent
b874b30185
commit
1ce2a0082b
|
@ -503,6 +503,8 @@ class CheckboxWidget(quixote.form.CheckboxWidget):
|
|||
Widget just like CheckboxWidget but with an effective support for the
|
||||
required attribute, if required the checkbox will have to be checked.
|
||||
'''
|
||||
template_name = 'qommon/forms/widgets/checkbox.html'
|
||||
|
||||
def _parse(self, request):
|
||||
self.value = self.name in request.form and not request.form[self.name] in (False, '', 'False')
|
||||
if self.required and not self.value:
|
||||
|
|
Loading…
Reference in New Issue