Skip to content

Commit f7abba9

Browse files
authored
Merge pull request #60 from fahzee1/fix-permafrost-test-for-inputs
update permission id and update failed test
2 parents 81ed38a + d70495c commit f7abba9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

permafrost/templates/permafrost/permafrostrole_form.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ <h6 class="m-0 text-primary font-weight-bold">
132132
<div class="col-6">
133133
{% for permission in category.optional %}
134134
<div class="d-flex align-items-center">
135-
<label for="{{ permission.id }}">{{ permission.name }}</label>
135+
<label for="permission-{{ permission.id }}">{{ permission.name }}</label>
136136

137137
{% if permission.short_description %}
138138
<i class="ml-2 fas fa-info-circle text-gray-600" aria-label="{% trans 'Info' %}"></i>
@@ -142,7 +142,7 @@ <h6 class="m-0 text-primary font-weight-bold">
142142
type="checkbox"
143143
name="{{ form.permissions.name }}"
144144
value="{{ permission.id }}"
145-
id="{{ permission.id }}"
145+
id="permission-{{ permission.id }}"
146146
{% if permission.selected %} checked{% endif %}
147147
>
148148
</div>

permafrost/tests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,13 +474,15 @@ def test_update_form_has_selected_optional_permission(self):
474474
type="checkbox"
475475
name="permissions"
476476
value="37"
477+
id="permission-37"
477478
checked
478479
>""")
479480
self.assertContains(response, """<input
480481
class="ml-auto"
481482
type="checkbox"
482483
name="permissions"
483484
value="38"
485+
id="permission-38"
484486
checked
485487
>""")
486488
except:

0 commit comments

Comments
 (0)