equal
deleted
inserted
replaced
639 if self.choices: |
639 if self.choices: |
640 return super(BooleanField, self).vocabulary(form) |
640 return super(BooleanField, self).vocabulary(form) |
641 return [(form._cw._('yes'), '1'), (form._cw._('no'), '')] |
641 return [(form._cw._('yes'), '1'), (form._cw._('no'), '')] |
642 |
642 |
643 def _ensure_correctly_typed(self, form, value): |
643 def _ensure_correctly_typed(self, form, value): |
644 if value is not None: |
644 return bool(value) |
645 return bool(value) |
|
646 return value |
|
647 |
645 |
648 |
646 |
649 class FloatField(IntField): |
647 class FloatField(IntField): |
650 def format_single_value(self, req, value): |
648 def format_single_value(self, req, value): |
651 formatstr = req.property_value('ui.float-format') |
649 formatstr = req.property_value('ui.float-format') |