mirror of
https://github.com/django/django.git
synced 2025-11-19 03:08:59 +00:00
Fixed #13782 -- Added CSS for errors in textareas and multiple fields in one line. Thanks, julien.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14999 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b224b05304
commit
75f16982d8
3 changed files with 8 additions and 4 deletions
|
|
@ -127,6 +127,9 @@ class AdminField(object):
|
|||
attrs = classes and {'class': u' '.join(classes)} or {}
|
||||
return self.field.label_tag(contents=contents, attrs=attrs)
|
||||
|
||||
def errors(self):
|
||||
return mark_safe(self.field.errors.as_ul())
|
||||
|
||||
class AdminReadonlyField(object):
|
||||
def __init__(self, form, field, is_first, model_admin=None):
|
||||
label = label_for_field(field, form._meta.model, model_admin)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue