Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[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
Luke Plant authored June 23, 2010
8  django/contrib/admin/media/css/base.css
@@ -445,6 +445,14 @@ ul.messagelist li {
445 445
     background: #ffc url(../img/admin/icon_success.gif) 5px .3em no-repeat;
446 446
 }
447 447
 
  448
+ul.messagelist li.warning{
  449
+    background-image: url(../img/admin/icon_alert.gif);
  450
+}
  451
+
  452
+ul.messagelist li.error{
  453
+    background-image: url(../img/admin/icon_error.gif);
  454
+}
  455
+
448 456
 .errornote {
449 457
     font-size: 12px !important;
450 458
     display: block;
4  django/contrib/admin/templates/admin/base.html
@@ -56,7 +56,9 @@
56 56
     {% endif %}
57 57
 
58 58
         {% if messages %}
59  
-        <ul class="messagelist">{% for message in messages %}<li>{{ message }}</li>{% endfor %}</ul>
  59
+        <ul class="messagelist">{% for message in messages %}
  60
+          <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
  61
+	{% endfor %}</ul>
60 62
         {% endif %}
61 63
 
62 64
     <!-- Content -->

0 notes on commit 71cecc4

Please sign in to comment.
Something went wrong with that request. Please try again.