Cleaning up checkbox code

This commit is contained in:
Montana
2019-01-07 13:58:20 -05:00
parent 7a7f8914c8
commit 5f613b3cd5
3 changed files with 8 additions and 39 deletions

View File

@@ -33,7 +33,7 @@
<li>
{% if choice[0] != 'other' %}
<input type='checkbox' name='{{ field.name }}' id='{{ field.name }}-{{ field.choices.index(choice) }}' value='{{ choice[0] }}' v-model="selections"/>
<label for='{{ field.name }}-{{ field.choices.index(choice) }}'>{{ choice[1] }}</label>
<label for='{{ field.name }}-{{ loop.index }}'>{{ choice[1] }}</label>
{% else %}
<input @click="otherToggle" type='checkbox' name='{{ field.name }}' id='{{ field.name }}-{{ field.choices.index(choice) }}' value='other' v-model="selections"/>
<label for='{{ field.name }}-{{ field.choices.index(choice) }}'>{{ choice[1] }}</label>