skill-assessment-app/app/views/admin/question/_checkbox.html.erb

19 lines
597 B
Plaintext
Raw Normal View History

2016-08-19 16:02:18 -05:00
<strong>Checkbox Options</strong>
<ul data-id="input_option_list">
<% question.input_options.each do | option | %>
<li>
2016-08-19 16:42:06 -05:00
<%= text_field_tag 'question[multi_choice][]', option, { disabled: (disable ||= false), data: { last: option } } %>
2016-08-19 16:02:18 -05:00
</li>
<% end %>
</ul>
<% unless (disable ||= false) %>
<div class="form-group">
<div class="btn tertiary-btn" data-id="input_option_adder"> Add option </div>
<li style="display: none;">
2016-08-19 16:42:06 -05:00
<%= text_field_tag 'question[multi_choice][]', nil, { disabled: (disable ||= false), data: { last: nil } } %>
2016-08-19 16:02:18 -05:00
</li>
</div>
<% end %>