Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.2.X] Fixed #12803 - Added styling for 'error' and 'warning' messag…

…es in admin.

  
Thanks to bboli and sebastian_noack for the report, DrMeers for the patch.

Backport of [13393] from trunk.  Considered a bug (and therefore backported)
due to error and warning messages being styled with green tick previously.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 71cecc49525263494a19e37788124e3275323745 1 parent 8f5236f
@spookylukey spookylukey authored
View
8 django/contrib/admin/media/css/base.css
@@ -445,6 +445,14 @@ ul.messagelist li {
background: #ffc url(../img/admin/icon_success.gif) 5px .3em no-repeat;
}
+ul.messagelist li.warning{
+ background-image: url(../img/admin/icon_alert.gif);
+}
+
+ul.messagelist li.error{
+ background-image: url(../img/admin/icon_error.gif);
+}
+
.errornote {
font-size: 12px !important;
display: block;
View
4 django/contrib/admin/templates/admin/base.html
@@ -56,7 +56,9 @@
{% endif %}
{% if messages %}
- <ul class="messagelist">{% for message in messages %}<li>{{ message }}</li>{% endfor %}</ul>
+ <ul class="messagelist">{% for message in messages %}
+ <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
+ {% endfor %}</ul>
{% endif %}
<!-- Content -->
Please sign in to comment.
Something went wrong with that request. Please try again.