476 |
476 |
477 You can specify separator using the `separator` constructor argument, by |
477 You can specify separator using the `separator` constructor argument, by |
478 default <br/> is used. |
478 default <br/> is used. |
479 """ |
479 """ |
480 type = 'checkbox' |
480 type = 'checkbox' |
|
481 default_separator = u'<br/>\n' |
481 vocabulary_widget = True |
482 vocabulary_widget = True |
482 |
483 |
483 def __init__(self, attrs=None, separator=u'<br/>\n', **kwargs): |
484 def __init__(self, attrs=None, separator=None, **kwargs): |
484 super(CheckBox, self).__init__(attrs, **kwargs) |
485 super(CheckBox, self).__init__(attrs, **kwargs) |
485 self.separator = separator |
486 self.separator = separator or self.default_separator |
486 |
487 |
487 def _render(self, form, field, renderer): |
488 def _render(self, form, field, renderer): |
488 curvalues, attrs = self.values_and_attributes(form, field) |
489 curvalues, attrs = self.values_and_attributes(form, field) |
489 domid = attrs.pop('id', None) |
490 domid = attrs.pop('id', None) |
490 # XXX turn this as initializer argument |
491 # XXX turn this as initializer argument |