25 lines
951 B
Plaintext
25 lines
951 B
Plaintext
<%
|
|
content_for :title, "Skills Assessment"
|
|
content_for :category, @question.category
|
|
content_for :footer_title, "Skills Assessment"
|
|
content_for :progress, @status.progress.to_s
|
|
%>
|
|
|
|
<%= form_for(@answer, url: post_answer_path(@answer.id), html:{method: :post, id: 'answer-form', data: {qid: @question.question_id}}) do |form| %>
|
|
|
|
<div><%= @question.question %></div>
|
|
<%= image_tag @question.attachment if @question.attachment.present? %>
|
|
|
|
<%= render partial: @question.input_type, locals: {question: @question, form: form, answer: @answer } %>
|
|
|
|
<% if @status.on_summary %>
|
|
<button type="submit" name="submit">Save and return to summary</button>
|
|
<% else %>
|
|
<button type="submit" name="save">Save</button>
|
|
<button type="submit" name="submit">Next →</button>
|
|
<% end %>
|
|
|
|
<%= hidden_field_tag 'answer[question_id]', @question.question_id %>
|
|
<%= hidden_field_tag 'answer[answer_id]', @question.answer_id %>
|
|
<% end %>
|