2016-07-27 22:16:12 -05:00
|
|
|
<%
|
|
|
|
content_for :title, "Skills Assessment"
|
|
|
|
content_for :category, @question.category
|
2016-07-28 08:22:05 -05:00
|
|
|
content_for :summary, true if @status.on_summary
|
2016-07-27 22:16:12 -05:00
|
|
|
content_for :footer_title, "Skills Assessment"
|
|
|
|
%>
|
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-07-27 22:16:12 -05:00
|
|
|
<main class="questions_tpl">
|
|
|
|
<h2 class="question-text"><%= @question.question %></h2>
|
2016-07-28 20:54:08 -05:00
|
|
|
|
|
|
|
<div class="content-well">
|
2016-07-30 16:25:09 -05:00
|
|
|
<%= 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} %>
|
2016-07-28 20:54:08 -05:00
|
|
|
</div>
|
2016-07-27 22:16:12 -05:00
|
|
|
|
|
|
|
<% if @status.on_summary %>
|
|
|
|
|
|
|
|
<div class="btn-container-summary">
|
|
|
|
<input type="submit" name="update" value="Save and return to summary">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<div class="btn-container-left">
|
|
|
|
<input type="submit" name="save" value="Save">
|
|
|
|
</div>
|
|
|
|
<div class="btn-container-right">
|
|
|
|
<input type="submit" name="submit" value="Next">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
</main>
|
2016-07-28 08:47:34 -05:00
|
|
|
<% end %>
|
2016-07-27 22:16:12 -05:00
|
|
|
|
2016-07-27 22:53:14 -05:00
|
|
|
<% unless @status.on_summary %>
|
|
|
|
<div class="progress ignore-margin">
|
|
|
|
<div class="progress-bar" role="progressbar" aria-valuenow="<%= @status.progress %>"
|
|
|
|
aria-valuemin="0" aria-valuemax="100" style="width: <%= @status.progress %>%">
|
|
|
|
<span><%= @status.progress %>%</span>
|
2016-07-27 22:16:12 -05:00
|
|
|
</div>
|
2016-07-27 22:53:14 -05:00
|
|
|
</div>
|
|
|
|
<% end %>
|