web/widgets.py
changeset 1190 15fc369bc3ca
parent 488 2984b3ec7034
child 1211 90bb6e89e356
equal deleted inserted replaced
1189:8a075bc94563 1190:15fc369bc3ca
   447             return entity.req._('yes')
   447             return entity.req._('yes')
   448         return entity.req._('no')
   448         return entity.req._('no')
   449 
   449 
   450 
   450 
   451 class YesNoRadioWidget(CheckBoxWidget):
   451 class YesNoRadioWidget(CheckBoxWidget):
   452     
   452     html_attributes = Widget.html_attributes | set(('disabled',))
   453     def _edit_render(self, entity):
   453     def _edit_render(self, entity):
   454         value = self.current_value(entity)
   454         value = self.current_value(entity)
   455         dvalue = self.current_display_value(entity)
   455         dvalue = self.current_display_value(entity)
   456         attrs1 = self.format_attrs()
   456         attrs1 = self.format_attrs()
   457         del self.attrs['id'] # avoid duplicate id for xhtml compliance
   457         del self.attrs['id'] # avoid duplicate id for xhtml compliance