Ticket #13782: errors_css.diff
File errors_css.diff, 2.2 KB (added by , 14 years ago) |
---|
-
django/contrib/admin/helpers.py
128 128 attrs = classes and {'class': u' '.join(classes)} or {} 129 129 return self.field.label_tag(contents=contents, attrs=attrs) 130 130 131 def errors(self): 132 return mark_safe(self.field.errors.as_ul()) 133 131 134 class AdminReadonlyField(object): 132 135 def __init__(self, form, field, is_first, model_admin=None): 133 136 label = label_for_field(field, form._meta.model, model_admin) -
django/contrib/admin/media/css/base.css
483 483 background: #ffc; 484 484 } 485 485 486 .errors input, .errors select {486 .errors input, .errors select, .errors textarea { 487 487 border: 1px solid red; 488 488 } 489 489 -
django/contrib/admin/templates/admin/includes/fieldset.html
4 4 <div class="description">{{ fieldset.description|safe }}</div> 5 5 {% endif %} 6 6 {% for line in fieldset %} 7 <div class="form-row{ % if line.errors %} errors{% endif %}{% for field in line %} {{ field.field.name }}{% endfor %}">8 { { line.errors }}7 <div class="form-row{#% if line.errors %} errors{% endif %#}{% for field in line %} {{ field.field.name }}{% endfor %}"> 8 {#{ line.errors }#} 9 9 {% for field in line %} 10 <div{% if not line.fields|length_is:"1" %} class="field-box"{% endif %}> 10 <div class="{% if not line.fields|length_is:'1' %}field-box{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}"> 11 {% if not field.is_readonly %}{{ field.errors }}{% endif %} 11 12 {% if field.is_checkbox %} 12 13 {{ field.field }}{{ field.label_tag }} 13 14 {% else %}