From: Marek Stępniowski <marek@stepniowski.com>
Date: Fri, 7 Aug 2009 14:05:12 +0000 (+0200)
Subject: Dodanie komunikatów o błędach, gdy nie zostanie wpisana nazwa użytkownika lub opis... 
X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/0c64954c4295bea6529f13fa027341ce50dfd4fa

Dodanie komunikatów o błędach, gdy nie zostanie wpisana nazwa użytkownika lub opis zmian.
---

diff --git a/project/static/css/master.css b/project/static/css/master.css
index 87262b55..a80c82b9 100644
--- a/project/static/css/master.css
+++ b/project/static/css/master.css
@@ -86,3 +86,18 @@ textarea {
     overflow-y: scroll;
     overflow-x: hidden;
 }
+
+.errorlist {
+    color: red;
+    margin: 0 20px 0 0;
+    padding: 0;
+    float: left;
+}
+
+.errorlist:before {
+    content: '';
+    clear: both;
+}
+p { 
+    margin: 0;
+}
\ No newline at end of file
diff --git a/project/templates/explorer/file_xml.html b/project/templates/explorer/file_xml.html
index ad55a88f..08e42e4c 100644
--- a/project/templates/explorer/file_xml.html
+++ b/project/templates/explorer/file_xml.html
@@ -66,6 +66,9 @@
     <form action="." method="post" accept-charset="utf-8">
         <div id="buttons"></div>
         {{ form.text }}
-        <p>Użytkownik: {{ form.user }} Opis zmian: {{ form.commit_message }} <input type="submit" value="Zapisz"/></p>
+        {{ form.user.errors }}
+        <p>Użytkownik: {{ form.user }}</p> 
+        {{ form.commit_message.errors }}
+        <p>Opis zmian: {{ form.commit_message }} <input type="submit" value="Zapisz"/></p>
     </form>
 {% endblock maincontent %}