42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
<main class="summary_tpl">
|
|
<h2 class="prft-heading">Almost done!</h2>
|
|
<p>
|
|
Now's the time to review your answers and go back and change any, if you need to.
|
|
Once you're done, hit the button at the bottom of the page to submit your answers.
|
|
</p>
|
|
|
|
|
|
<%= form_tag(post_summary_path) do %>
|
|
<% @candidate.quiz.questions.each do |question| %>
|
|
<article class="answer-sec">
|
|
<div class="question-heading">
|
|
<div class="question-title">
|
|
<h3><%= question.question %></h3>
|
|
</div>
|
|
<div class="answer-buttons">
|
|
<a href="<%= question_path(question.to_i) %>" class="tertiary-btn button-edit" data-questionId="<%= question.to_i %>">Edit</a>
|
|
<button class="tertiary-btn button-save">Save</button>
|
|
<button class="tertiary-btn button-cancel">Cancel</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="answer-container">
|
|
<fieldset disabled class="answer-block">
|
|
<%= render partial: question.input_type, locals: {question: question, answer: @answers.where(question_id: question.id).first.answer } %>
|
|
</fieldset>
|
|
</div>
|
|
</article>
|
|
<% end #questions loop %>
|
|
|
|
<% if @status.can_submit %>
|
|
<div class="btn-container-right">
|
|
<input type="submit" class="submit-button" value="Submit all answers" name="submit" />
|
|
</div>
|
|
<% else %>
|
|
<div class="error">Sorry, you must answer all questions before you can submit.</div>
|
|
<% end %>
|
|
|
|
<% end #form_tag %>
|
|
|
|
</main>
|