skill-assessment-app/app/views/candidate/summary.html.erb

42 lines
1.7 KiB
Plaintext
Raw Normal View History

2016-07-28 20:54:08 -05:00
<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>
2016-07-30 16:25:09 -05:00
<% @quiz.each do |question| %>
2016-08-01 15:58:20 -05:00
<%= form_for(:answer, url: post_answer_path(answer_id: question.answer_id, qid: question.question_id), html:{class: 'summary-form'}) do |form| %>
2016-07-29 16:28:02 -05:00
<article class="answer-sec <%= question.input_type %>-type" data-qid="<%= question.question_id %>">
2016-07-28 20:54:08 -05:00
<div class="question-heading">
<div class="question-title">
<h3><%= question.question %></h3>
</div>
<div class="answer-buttons">
<a href="<%= question_path(question.question_id) %>" class="tertiary-btn button-edit" data-questionId="<%= question.question_id %>">Edit</a>
2016-07-28 20:54:08 -05:00
<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">
2016-07-30 16:25:09 -05:00
<%= hidden_field_tag 'answer[question_id]', question.question_id %>
<%= render partial: question.input_type, locals: {question: question, form: form} %>
2016-07-28 20:54:08 -05:00
</fieldset>
</div>
</article>
<% end #questions loop %>
2016-07-30 16:25:09 -05:00
<% end #form_tag %>
2016-07-28 20:54:08 -05:00
2016-07-30 16:25:09 -05:00
<% 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 %>
2016-07-28 20:54:08 -05:00
</main>