Ticket #2168: form.html

File form.html, 2.2 KB (added by kanashii@…, 18 years ago)
Line 
1{% load i18n %}
2{% if display_form %}
3<form {% if photos_optional or photos_required %}enctype="multipart/form-data" {% endif %}action="/comments/post/" method="post">
4 <fieldset>
5 <dl>
6 {% if user.is_anonymous %}
7 <dt><label for="id_username">{% trans "Username:" %}</label></dt>
8 <dd><input type="text" name="username" id="id_username" /></dd>
9
10 <dt><label for="id_password">{% trans "Password:" %}</label></dt>
11 <dd><input type="password" name="password" id="id_password" /> (<a href="/accounts/password_reset/">{% trans "Forgotten your password?" %}</a>)</dd>
12 {% else %}
13 <dt>{% trans "Username:" %}</dt>
14 <dd><strong>{{ user.username }}</strong> (<a href="/accounts/logout/">{% trans "Log out" %}</a>)</dd>
15 {% endif %}
16
17 {% if ratings_optional or ratings_required %}
18 <dt>{% trans "Ratings" %} ({% if ratings_required %}{% trans "Required" %}{% else %}{% trans "Optional" %}{% endif %}):</dt>
19 <dd>
20 <table>
21 <tr><th></th>{% for value in rating_range %}<th scope="col">{{ value }}</th>{% endfor %}</tr>
22 {% for rating in rating_choices %}
23 <tr><th scope="row">{{ rating }}</th>{% for value in rating_range %}<td><input type="radio" name="rating{{ forloop.parentloop.counter }}" value="{{ value }}" /></td>{% endfor %}</tr>
24 {% endfor %}
25 </table>
26 <input type="hidden" name="rating_options" value="{{ rating_options }}" />
27 </dd>
28 {% endif %}
29
30 {% if photos_optional or photos_required %}
31 <dt><label for="id_photo">{% trans "Post a photo" %} ({% if photos_required %}{% trans "Required" %}{% else %}{% trans "Optional" %}{% endif %}):</label></dt>
32 <dd><input type="file" name="photo" id="id_photo" /><input type="hidden" name="photo_options" value="{{ photo_options }}" /></dd>
33 {% endif %}
34
35 <dt><label for="id_comment">{% trans "Comment:" %}</label></dt>
36 <dd><textarea name="comment" id="id_comment" rows="10" cols="60"></textarea></dd>
37 </dl>
38
39 <input type="hidden" name="options" value="{{ options }}" />
40 <input type="hidden" name="target" value="{{ target }}" />
41 <input type="hidden" name="gonzo" value="{{ hash }}" />
42 <input type="submit" name="preview" value="{% trans "Preview comment" %}" />
43 </fieldset>
44</form>
45{% endif %}
Back to Top