40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
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| %>
|
|
<main class="answer-sec <%= @question.input_type %>-type questions_tpl" data-qid="<%= @question.question_id %>">
|
|
<h2 class="question-text"><%= @question.question %></h2>
|
|
|
|
<% if @question.attachment.present? %>
|
|
<%= image_tag @question.attachment %>
|
|
<% end %>
|
|
|
|
<div class="content-well">
|
|
<%= hidden_field_tag 'answer[question_id]', @question.question_id %>
|
|
<%= hidden_field_tag 'answer[answer_id]', @question.answer_id %>
|
|
<%= render partial: @question.input_type, locals: {question: @question, form: form, answer: @answer } %>
|
|
</div>
|
|
|
|
<% if @status.on_summary %>
|
|
|
|
<div class="btn-container-summary button-wrap">
|
|
<input type="submit" name="submit" value="Save and return to summary">
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<div class="btn-container-left">
|
|
<input type="submit" class="secondary-btn" name="save" value="Save">
|
|
</div>
|
|
<div class="btn-container-right">
|
|
<input type="submit" class="tertiary-btn arrow-btn-right" name="submit" value="Next →">
|
|
</div>
|
|
|
|
<% end %>
|
|
</main>
|
|
<% end %>
|