39 lines
1.3 KiB
HTML
39 lines
1.3 KiB
HTML
{% load i18n %}
|
|
<h2>{% trans "Your subscriptions" %}</h2>
|
|
<div id="subscription-cell-{{ instance.id }}">
|
|
{{ form.non_field_errors }}
|
|
{% for field in form %}
|
|
{{ field.errors }}
|
|
{% endfor %}
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
<table id="subscription-cell-table-{{ instance.id }}">
|
|
<thead>
|
|
<tr>
|
|
<td>{% trans "Name" %}</td>
|
|
{% for choice in form.all_choices %}
|
|
<td id="subscription-cell-header-{{choice|slugify}}-{{instance.id}}" class="subscription-cell-header-{{choice|slugify}}">
|
|
{{ choice }}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for field in form %}
|
|
<tr class="{% for checkbox in field %}{% if checkbox.is_checked %}subscription-cell-checked-{{ checkbox.choice_value|slugify }}{% endif %}{% endfor %}">
|
|
<td><label>{{ field.label }}</label></td>
|
|
{% for choice in form.all_choices %}
|
|
{% for checkbox in field %}
|
|
{% if checkbox.choice_value == choice %}
|
|
<td>{{ checkbox.tag }}</td>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<input type="submit" value="{% trans "Modify" %}"/>
|
|
</form>
|
|
</div>
|