Fixed #2168 -- Made comment templates more accessible

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3203 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-06-26 00:48:12 +00:00
parent fd702fe034
commit 2837455878
2 changed files with 7 additions and 5 deletions

View File

@ -3,7 +3,7 @@
<form {% if photos_optional or photos_required %}enctype="multipart/form-data" {% endif %}action="/comments/post/" method="post"> <form {% if photos_optional or photos_required %}enctype="multipart/form-data" {% endif %}action="/comments/post/" method="post">
{% if user.is_anonymous %} {% if user.is_anonymous %}
<p>{% trans "Username:" %} <input type="text" name="username" id="id_username" /><br />{% trans "Password:" %} <input type="password" name="password" id="id_password" /> (<a href="/accounts/password_reset/">{% trans "Forgotten your password?" %}</a>)</p> <p><label for="id_username">{% trans "Username:" %}</label> <input type="text" name="username" id="id_username" /><br />{% trans "Password:" %} <input type="password" name="password" id="id_password" /> (<a href="/accounts/password_reset/">{% trans "Forgotten your password?" %}</a>)</p>
{% else %} {% else %}
<p>{% trans "Username:" %} <strong>{{ user.username }}</strong> (<a href="/accounts/logout/">{% trans "Log out" %}</a>)</p> <p>{% trans "Username:" %} <strong>{{ user.username }}</strong> (<a href="/accounts/logout/">{% trans "Log out" %}</a>)</p>
{% endif %} {% endif %}
@ -20,11 +20,13 @@
{% endif %} {% endif %}
{% if photos_optional or photos_required %} {% if photos_optional or photos_required %}
<p>{% trans "Post a photo" %} ({% if photos_required %}{% trans "Required" %}{% else %}{% trans "Optional" %}{% endif %}): <input type="file" name="photo" /></p> <p><label for="id_photo">{% trans "Post a photo" %}</label> ({% if photos_required %}{% trans "Required" %}{% else %}{% trans "Optional" %}{% endif %}):
<input type="file" name="photo" id="id_photo" /></p>
<input type="hidden" name="photo_options" value="{{ photo_options }}" /> <input type="hidden" name="photo_options" value="{{ photo_options }}" />
{% endif %} {% endif %}
<p>{% trans "Comment:" %}<br /><textarea name="comment" id="id_comment" rows="10" cols="60"></textarea></p> <p><label for="id_comment">{% trans "Comment:" %}</label><br />
<textarea name="comment" id="id_comment" rows="10" cols="60"></textarea></p>
<input type="hidden" name="options" value="{{ options }}" /> <input type="hidden" name="options" value="{{ options }}" />
<input type="hidden" name="target" value="{{ target }}" /> <input type="hidden" name="target" value="{{ target }}" />

View File

@ -1,8 +1,8 @@
{% load i18n %} {% load i18n %}
{% if display_form %} {% if display_form %}
<form action="/comments/postfree/" method="post"> <form action="/comments/postfree/" method="post">
<p>{% trans "Your name:" %} <input type="text" id="id_person_name" name="person_name" /></p> <p><label for="id_person_name">{% trans "Your name:" %}</label> <input type="text" id="id_person_name" name="person_name" /></p>
<p>{% trans "Comment:" %}<br /><textarea name="comment" id="id_comment" rows="10" cols="60"></textarea></p> <p><label for="id_comment">{% trans "Comment:" %}</label><br /><textarea name="comment" id="id_comment" rows="10" cols="60"></textarea></p>
<input type="hidden" name="options" value="{{ options }}" /> <input type="hidden" name="options" value="{{ options }}" />
<input type="hidden" name="target" value="{{ target }}" /> <input type="hidden" name="target" value="{{ target }}" />
<input type="hidden" name="gonzo" value="{{ hash }}" /> <input type="hidden" name="gonzo" value="{{ hash }}" />