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

19 lines
596 B
Plaintext
Raw Normal View History

2016-08-19 16:02:18 -05:00
<strong>Radio 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 %>