equal
deleted
inserted
replaced
873 |
873 |
874 def vocabulary(self, form): |
874 def vocabulary(self, form): |
875 if self.choices: |
875 if self.choices: |
876 return super(BooleanField, self).vocabulary(form) |
876 return super(BooleanField, self).vocabulary(form) |
877 if self.allow_none: |
877 if self.allow_none: |
878 return [('', ''), (form._cw._('yes'), '1'), (form._cw._('no'), '0')] |
878 return [(form._cw._('indifferent'), ''), |
|
879 (form._cw._('yes'), '1'), |
|
880 (form._cw._('no'), '0')] |
879 # XXX empty string for 'no' in that case for bw compat |
881 # XXX empty string for 'no' in that case for bw compat |
880 return [(form._cw._('yes'), '1'), (form._cw._('no'), '')] |
882 return [(form._cw._('yes'), '1'), (form._cw._('no'), '')] |
881 |
883 |
882 def format_single_value(self, req, value): |
884 def format_single_value(self, req, value): |
883 """return value suitable for display""" |
885 """return value suitable for display""" |