diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2024-02-29 09:35:55 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2024-12-21 19:43:13 +0200 |
| commit | 65b11d9d029558cacc7b4270dd7eaa2f1f63439e (patch) | |
| tree | cfaff12ae1b2daba749336e8aecd878035488e54 /templates/poll_vote_table.html.j2 | |
| parent | 513d520722fe86635965aec2fb5c6666b51c4be2 (diff) | |
Fix issue where an empty vote submission would not visually show
Diffstat (limited to 'templates/poll_vote_table.html.j2')
| -rw-r--r-- | templates/poll_vote_table.html.j2 | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/templates/poll_vote_table.html.j2 b/templates/poll_vote_table.html.j2 index bfba968..072d17a 100644 --- a/templates/poll_vote_table.html.j2 +++ b/templates/poll_vote_table.html.j2 @@ -16,18 +16,22 @@ </th> {% endfor %} </tr> - {% for voter in choices_by_voter %} + {% for voter_name in voter_names %} <tr> - <td>{{ voter.name }}</td> - {% for voted in voter.votes %} - {% if voted %} + <td>{{ voter_name }}</td> + {% for choice in choices %} + {% if selections[(voter_name, choice.id)] == 1 %} <td> <input type="checkbox" checked disabled> </td> - {% else %} + {% elif selections[(voter_name, choice.id)] == 0 %} <td> <input type="checkbox" disabled> </td> + {% else %} + <td> + ?? + </td> {% endif %} {% endfor %} </tr> |
