fix: Enhances activity visibility control
Replaces conditional rendering with inline style for hidden activities. This simplifies the template logic and maintains consistent structure for all activities, enhancing UI flexibility.
This commit is contained in:
parent
d522f23b55
commit
3c3cfc38ba
1 changed files with 2 additions and 3 deletions
|
@ -79,14 +79,13 @@
|
|||
<b>{{ activitycategory.name }}</b>
|
||||
</p>
|
||||
{% for activity in activitycategory.activity_set.all|dictsort:"name" %}
|
||||
{% if not activity.hidden %}
|
||||
<p {% if activity.hidden %}style="display: none;"{% endif %}>
|
||||
<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>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% other_activities as activities %}
|
||||
|
|
Loading…
Reference in a new issue