<%-
|
|
content_for :title, question.page_title.blank? ? question.title : question.page_title
|
|
content_for :meta_description, question.page_description
|
|
%>
|
|
|
|
<%= form_with model: @answer, url: url_for(controller: 'answers', action: 'create') do |form| %>
|
|
|
|
<div class="question-container">
|
|
|
|
<div class="question-step">
|
|
<div><%= question_index %>/<%= questions_size %></div>
|
|
</div>
|
|
|
|
<div class="question-header">
|
|
<%= question.title %>
|
|
</div>
|
|
|
|
<% question.attachments.with_text.each_slice(2).each_with_index do |answer_option, i| %>
|
|
<div class="question-answer">
|
|
<%= form.label :value, for: nil do %>
|
|
<%= answer_option.first.body.html_safe %>
|
|
<%= form.radio_button :value, i %>
|
|
<%- end -%>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%= form.submit t('submit'), class: 'button__base' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|