49 lines
1.6 KiB
Plaintext
49 lines
1.6 KiB
Plaintext
<%
|
|
content_for :title, "Skills Assessment"
|
|
content_for :category, @question.category
|
|
content_for :summary, true if @status.on_summary
|
|
content_for :footer_title, "Skills Assessment"
|
|
%>
|
|
|
|
<%= 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} %>
|
|
</div>
|
|
|
|
<% 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>
|
|
<% end %>
|
|
|
|
<% 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>
|
|
</div>
|
|
</div>
|
|
<% end %>
|