2016-07-27 22:16:12 -05:00
|
|
|
<%
|
|
|
|
content_for :title, "Skills Assessment"
|
|
|
|
content_for :category, @question.category
|
|
|
|
content_for :footer_title, "Skills Assessment"
|
2016-08-08 11:56:42 -05:00
|
|
|
content_for :progress, @status.progress.to_s
|
2016-07-27 22:16:12 -05:00
|
|
|
%>
|
2016-07-28 08:22:05 -05:00
|
|
|
|
2016-08-01 17:06:24 -05:00
|
|
|
<%= form_for(@answer, url: post_answer_path(@answer.id), html:{method: :post, id: 'answer-form', data: {qid: @question.question_id}}) do |form| %>
|
2016-08-02 16:20:59 -05:00
|
|
|
<main class="answer-sec <%= @question.input_type %>-type questions_tpl" data-qid="<%= @question.question_id %>">
|
|
|
|
<h2 class="question-text"><%= @question.question %></h2>
|
|
|
|
|
2016-08-03 08:55:30 -05:00
|
|
|
<% if @question.attachment.present? %>
|
|
|
|
<%= image_tag @question.attachment %>
|
|
|
|
<% end %>
|
|
|
|
|
2016-08-02 16:20:59 -05:00
|
|
|
<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} %>
|
|
|
|
</div>
|
2016-07-27 22:16:12 -05:00
|
|
|
|
2016-08-02 16:20:59 -05:00
|
|
|
<% if @status.on_summary %>
|
2016-07-27 22:16:12 -05:00
|
|
|
|
2016-08-04 18:03:23 -05:00
|
|
|
<div class="btn-container-summary button-wrap">
|
2016-08-03 10:46:03 -05:00
|
|
|
<input type="submit" name="submit" value="Save and return to summary">
|
2016-08-02 16:20:59 -05:00
|
|
|
</div>
|
2016-07-27 22:16:12 -05:00
|
|
|
|
2016-08-02 16:20:59 -05:00
|
|
|
<% else %>
|
2016-07-27 22:16:12 -05:00
|
|
|
|
2016-08-02 16:20:59 -05:00
|
|
|
<div class="btn-container-left">
|
2016-08-04 08:51:54 -05:00
|
|
|
<input type="submit" class="secondary-btn" name="save" value="Save">
|
2016-08-02 16:20:59 -05:00
|
|
|
</div>
|
|
|
|
<div class="btn-container-right">
|
2016-08-04 08:51:54 -05:00
|
|
|
<input type="submit" class="tertiary-btn arrow-btn-right" name="submit" value="Next →">
|
2016-08-02 16:20:59 -05:00
|
|
|
</div>
|
2016-07-27 22:16:12 -05:00
|
|
|
|
2016-08-02 16:20:59 -05:00
|
|
|
<% end %>
|
2016-07-27 22:16:12 -05:00
|
|
|
</main>
|
2016-07-28 08:47:34 -05:00
|
|
|
<% end %>
|