Fix mindless copy-paste programming

This commit is contained in:
Kumi 2021-02-17 05:55:04 +00:00
parent 431f7acba2
commit d658fa4ea6

View file

@ -36,20 +36,19 @@
<tr><th><label for="activities">Activities:</label></th><td>
{% for activitycategory in request.user.activitycategory_set.all %}
<b>{{ activitycategory.name }}</b>
<p><b>{{ activitycategory.name }}</b></p>
{% for activity in activitycategory.activity_set.all %}
{% for activity in activitycategory.activity_set.all|dictsort:"name" %}
<input type="checkbox" {% if activity in object.activity_set %}checked{% endif %} value="{{ activity.id }}" name="activities"> <i class="{{ activity.icon }}" style="color:{{ activity.color }};"></i> {{ activity }}<br>
{% endfor %}
{% endfor %}
<b>Uncategorized activities</b>
{% other_activities as activities %}
{% if activities %}<p><b>Uncategorized activities</b></p>{% endif%}
{% for activitycategory in request.user.activitycategory_set.all %}
{% for activity in activitycategory.activity_set.all %}
{% for activity in activities|dictsort:"name" %}
<input type="checkbox" {% if activity in object.activity_set %}checked{% endif %} value="{{ activity.id }}" name="activities"> <i class="{{ activity.icon }}" style="color:{{ activity.color }};"></i> {{ activity }}<br>
{% endfor %}
{% endfor %}
</td></tr>
<tr><th><label for="id_uploads">Uploads:</label></th><td><input type="file" name="uploads" id="id_uploads" multiple="multiple"></td></tr>