skill-assessment-app/app/views/admin/question/_radio_other.html.erb
2017-06-05 11:30:34 -05:00

18 lines
505 B
Plaintext

<strong>Radio Options</strong>
<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) %>
<div>Add option</div>
<div>
<%= text_field_tag 'question[multi_choice][]', nil, { disabled: (disable ||= false), data: { last: nil } } %>
</div>
<% end %>