Commits

Anonymous committed 582f939

Delete previous errors before adding more to the page

Comments (0)

Files changed (2)

ajaxcomments/media/js/post-comment.js

 }
 
 function commentFailure(data) {
+    $('div.comment-form ul.errorlist').each(function() {
+	    this.parentNode.removeChild(this);
+        });
+
     for (var error in data.errors) {
         $('#id_' + error).parent().before(data.errors[error])
     }

ajaxcomments/templates/comments/comment.html

     <p>comment.comment</p>
   </div>
   <div class="clear"></div>
-  <p class="posted-by">Posted by <a href="{% url profile_detail comment.user
-  %}">{{comment.user}}</a> {{ comment.submit_date|timesince }} ago</div>
+  <p class="posted-by">Posted by <a href="{% url profile_detail comment.user %}">{{comment.user}}</a> {{ comment.submit_date|timesince }} ago</div>
 </div>