skill-assessment-app/app/views/admin/question/_checkbox.html.erb
2016-08-22 16:26:21 -05:00

19 lines
599 B
Plaintext

<strong>Checkbox Options</strong>
<ul data-id="input_option_list">
<% question.input_options.each do | option | %>
<li>
<%= text_field_tag 'question[input_options][]', option, { disabled: (disable ||= false), data: { last: option } } %>
</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;">
<%= text_field_tag 'question[input_options][]', nil, { disabled: (disable ||= false), data: { last: nil } } %>
</li>
</div>
<% end %>