=== modified file 'django/newforms/forms.py'
|
|
|
133 | 133 | else: |
134 | 134 | outer_attrs = bf.field.widget.outer_attrs |
135 | 135 | outer_class_list = outer_attrs.pop('class', '').split() |
| 136 | outer_class_list.append(bf.field.widget.__class__.__name__) |
136 | 137 | if bf.field.required: |
137 | 138 | outer_class_list.append('required') |
138 | 139 | if bf_errors: |
139 | 140 | outer_class_list.append('error') |
140 | | if outer_class_list: |
141 | | outer_attrs['class'] = ' '.join(outer_class_list) |
| 141 | outer_attrs['class'] = ' '.join(outer_class_list) |
142 | 142 | if errors_on_separate_row and bf_errors: |
143 | 143 | output.append(error_row % force_unicode(bf_errors)) |
144 | 144 | if bf.label: |