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

18 lines
505 B
Plaintext
Raw Normal View History

<strong>Radio Options</strong>
2017-03-20 10:57:50 -05:00
<ul>
<% question.input_options.each do | option | %>
<li>
<%= text_field_tag 'question[multi_choice][]', option, { disabled: (disable ||= false), data: { last: option } } %>
</li>
<% end %>
<li>Other: <input type="text" disabled="disabled" /></li>
</ul>
<% unless (disable ||= false) %>
2017-03-20 10:57:50 -05:00
<div>Add option</div>
<div>
<%= text_field_tag 'question[multi_choice][]', nil, { disabled: (disable ||= false), data: { last: nil } } %>
</div>
<% end %>