templates: add class and <th> tags to tables (#3106)

This commit is contained in:
Frédéric Péters 2013-06-24 10:35:19 +02:00
parent 8b7300edc0
commit 8afa3e4e1a
2 changed files with 6 additions and 6 deletions

View File

@ -3,19 +3,19 @@
<form method="post">
{% csrf_token %}
{{ form.non_field_errors }}
<table>
<table class="announces">
<thead>
<tr>
<td>{% trans "Category" %}</td>
{% for choice_key, choice_name in form.choices %}
<td>{{ choice_name }}</td>
<th>{{ choice_name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for field in form %}
<tr>
<td>{{ field.label }}</td>
<th>{{ field.label }}</th>
{% for subwidget in field %}
<td>{{ subwidget.tag }}</td>
{% endfor %}

View File

@ -5,19 +5,19 @@
<form method="post">
{% csrf_token %}
{{ form.non_field_errors }}
<table>
<table class="announces">
<thead>
<tr>
<td>{% trans "Category" %}</td>
{% for choice_key, choice_name in form.choices %}
<td>{{ choice_name }}</td>
<th>{{ choice_name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for field in form %}
<tr>
<td>{{ field.label }}</td>
<th>{{ field.label }}</th>
{% for subwidget in field %}
<td>{{ subwidget.tag }}</td>
{% endfor %}