web/formfields.py
changeset 4181 c79135c217df
parent 4171 f1b9f0ed1253
parent 4131 d8ca873142f4
child 4225 c49bb6e3d343
equal deleted inserted replaced
4173:cfd5d3270f99 4181:c79135c217df
   616 class BooleanField(Field):
   616 class BooleanField(Field):
   617     widget = Radio
   617     widget = Radio
   618 
   618 
   619     def vocabulary(self, form):
   619     def vocabulary(self, form):
   620         if self.choices:
   620         if self.choices:
   621             return self.choices
   621             return super(BooleanField, self).vocabulary(form)
   622         return [(form._cw._('yes'), '1'), (form._cw._('no'), '')]
   622         return [(form._cw._('yes'), '1'), (form._cw._('no'), '')]
   623 
   623 
   624     def process_form_value(self, form):
   624     def process_form_value(self, form):
   625         return bool(Field.process_form_value(self, form))
   625         return bool(Field.process_form_value(self, form))
   626 
   626