Ticket #2300: django_forms__init__.diff

File django_forms__init__.diff, 1.1 KB (added by lerouxb@…, 13 years ago)
  • django/forms/__init__.py

     
    5353
    5454    def get_validation_errors(self, new_data):
    5555        "Returns dictionary mapping field_names to error-message lists"
     56        self.prepare(new_data)
    5657        errors = {}
    5758        for field in self.fields:
    5859            errors.update(field.get_validation_errors(new_data))
     
    636637            if str(value) in str_data_list:
    637638                checked_html = ' checked="checked"'
    638639            field_name = '%s%s' % (self.field_name, value)
    639             output.append('<li><input type="checkbox" id="%s" class="v%s" name="%s"%s /> <label for="%s">%s</label></li>' % \
     640            output.append('<li><input type="checkbox" id="%s" class="v%s" name="%s"%s value="on" /> <label for="%s">%s</label></li>' % \
    640641                (self.get_id() + value , self.__class__.__name__, field_name, checked_html,
    641642                self.get_id() + value, choice))
    642643        output.append('</ul>')
Back to Top