mirror of https://github.com/django/django.git
Fixed #2283 (again) - comment form templates don't validate as XHTML
Thanks to hjoreteg/thejaswi_puthraya for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13855 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
3c19671711
commit
34a4af50be
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>Comment post not allowed (400)</title>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<h1>{% trans "Really make this comment public?" %}</h1>
|
||||
<blockquote>{{ comment|linebreaks }}</blockquote>
|
||||
<form action="." method="post">{% csrf_token %}
|
||||
{% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
|
||||
{% if next %}<div><input type="hidden" name="next" value="{{ next }}" id="next" /></div>{% endif %}
|
||||
<p class="submit">
|
||||
<input type="submit" name="submit" value="{% trans "Approve" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
|
||||
</p>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html lang="en">
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<h1>{% trans "Really remove this comment?" %}</h1>
|
||||
<blockquote>{{ comment|linebreaks }}</blockquote>
|
||||
<form action="." method="post">{% csrf_token %}
|
||||
{% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
|
||||
{% if next %}<div><input type="hidden" name="next" value="{{ next }}" id="next" /></div>{% endif %}
|
||||
<p class="submit">
|
||||
<input type="submit" name="submit" value="{% trans "Remove" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
|
||||
</p>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<h1>{% trans "Really flag this comment?" %}</h1>
|
||||
<blockquote>{{ comment|linebreaks }}</blockquote>
|
||||
<form action="." method="post">{% csrf_token %}
|
||||
{% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
|
||||
{% if next %}<div><input type="hidden" name="next" value="{{ next }}" id="next" /></div>{% endif %}
|
||||
<p class="submit">
|
||||
<input type="submit" name="submit" value="{% trans "Flag" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
|
||||
</p>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{% load comments i18n %}
|
||||
<form action="{% comment_form_target %}" method="post">{% csrf_token %}
|
||||
{% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
|
||||
{% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
|
||||
{% for field in form %}
|
||||
{% if field.is_hidden %}
|
||||
{{ field }}
|
||||
<div>{{ field }}</div>
|
||||
{% else %}
|
||||
{% if field.errors %}{{ field.errors }}{% endif %}
|
||||
<p
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
{% block content %}
|
||||
{% load comments %}
|
||||
<form action="{% comment_form_target %}" method="post">{% csrf_token %}
|
||||
{% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
|
||||
{% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
|
||||
{% if form.errors %}
|
||||
<h1>{% blocktrans count form.errors|length as counter %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}</h1>
|
||||
{% else %}
|
||||
|
@ -18,7 +18,7 @@
|
|||
{% endif %}
|
||||
{% for field in form %}
|
||||
{% if field.is_hidden %}
|
||||
{{ field }}
|
||||
<div>{{ field }}</div>
|
||||
{% else %}
|
||||
{% if field.errors %}{{ field.errors }}{% endif %}
|
||||
<p
|
||||
|
|
Loading…
Reference in New Issue