Ticket #19874: widgets-add_id_to_CheckboxSelectMultiple.patch
File widgets-add_id_to_CheckboxSelectMultiple.patch, 580 bytes (added by , 12 years ago) |
---|
-
widgets.
old new 684 684 if value is None: value = [] 685 685 final_attrs = self.build_attrs(attrs, name=name) 686 686 id_ = final_attrs.get('id', None) 687 output = ['<ul>'] 687 if id_: 688 output = ['<ul id="%s">' % id_] 689 else: 690 output = ['<ul>'] 688 691 # Normalize to strings 689 692 str_values = set([force_text(v) for v in value]) 690 693 for i, (option_value, option_label) in enumerate(chain(self.choices, choices)):