moved question partials
This commit is contained in:
20
app/views/candidate/_checkbox.html.erb
Normal file
20
app/views/candidate/_checkbox.html.erb
Normal file
@ -0,0 +1,20 @@
|
||||
<div class="content-well">
|
||||
|
||||
<%
|
||||
@question.input_options.each do | option |
|
||||
option_id = "#{option.parameterize}_#{@question.to_i}"
|
||||
%>
|
||||
<div class="form-group-multiples">
|
||||
<input type="checkbox" class="checkbox"
|
||||
name="input_checkbox_<%= @question.to_i %>[]"
|
||||
id="check_<%= option_id %>"
|
||||
value="<%= option %>"
|
||||
<%= "checked=\"checked\"" if Array(@answer.answer).include?(option) %>
|
||||
>
|
||||
<label for="check_<%= option_id %>"><%= option %></label>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
-- MOVE TO FLASH HASH --
|
||||
<div class="error">Please select or enter an answer.</div>
|
||||
</div>
|
41
app/views/candidate/_live-coder.html.erb
Normal file
41
app/views/candidate/_live-coder.html.erb
Normal file
@ -0,0 +1,41 @@
|
||||
<div class="js-error">
|
||||
Please revisit this page with JavaScript enabled to modify your answer.
|
||||
</div>
|
||||
|
||||
<div data-id="live-coder-finish-later">
|
||||
<p class="warning">
|
||||
This is a question where you will be asked to write code, and it utilizes a JavaScript-enabled
|
||||
environment. It looks like JavaScript is not loaded for some reason. Please check the box below
|
||||
to acknowledge that you agree to come back at a later time to finish answering this question
|
||||
before you can submit the test.
|
||||
</p>
|
||||
<input type="checkbox" class="checkbox" name="live-coder-later" value="check_1" id="check_1" />
|
||||
<label for="check_1">I will come back later to finish this live coding question</label>
|
||||
</div>
|
||||
|
||||
<div data-id="live-coder-answer">
|
||||
<%
|
||||
# answers inserted dynamically via jQuery .load()
|
||||
# to check for JS capability/enabled
|
||||
%>
|
||||
|
||||
<div class="code-input">
|
||||
<label for="code-html">HTML</label>
|
||||
<textarea data-id="code-html" name="code-html"><%= @answer.answer.try(:[], ['html']) %></textarea>
|
||||
</div>
|
||||
|
||||
<div class="code-input">
|
||||
<label for="code-css">CSS</label>
|
||||
<textarea data-id="code-css" name="code-css"><%= @answer.answer.try(:[], ['css']) %></textarea>
|
||||
</div>
|
||||
|
||||
<div class="code-input">
|
||||
<label for="code-js">JS</label>
|
||||
<textarea data-id="code-js" name="code-js"><%= @answer.answer.try(:[], ['js']) %></textarea>
|
||||
</div>
|
||||
|
||||
-- MOVE TO FLASH HASH --
|
||||
<div class="error">You must write code in one of the above textareas to progress.</div>
|
||||
|
||||
<div class="results" data-id="results"></div>
|
||||
</div>
|
20
app/views/candidate/_radio.html.erb
Normal file
20
app/views/candidate/_radio.html.erb
Normal file
@ -0,0 +1,20 @@
|
||||
<div class="content-well">
|
||||
|
||||
<%
|
||||
@question.input_options.each do | option |
|
||||
option_id = "#{option.parameterize}_#{@question.to_i}"
|
||||
%>
|
||||
<div class="form-group-multiples">
|
||||
<input type="radio" class="radio"
|
||||
name="input_radio_<%= @question.to_i %>"
|
||||
id="radio_<%= option_id %>"
|
||||
value="<%= option %>"
|
||||
<%= "checked=\"checked\"" if @answer.answer == option %>
|
||||
>
|
||||
<label for="radio_<%= option_id %>"><%= option %></label>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
-- MOVE TO FLASH HASH --
|
||||
<div class="error">Please select or enter an answer. (The character limit for a textarea answer is 1000)</div>
|
||||
</div>
|
11
app/views/candidate/_text.html.erb
Normal file
11
app/views/candidate/_text.html.erb
Normal file
@ -0,0 +1,11 @@
|
||||
<div class="form-group">
|
||||
|
||||
<label for="textArea">Enter answer here</label>
|
||||
<textarea id="textArea" name="textarea" rows="10"><%= @answer.answer %></textarea>
|
||||
|
||||
<div class="chars">Characters remaining: <span></span></div>
|
||||
|
||||
-- MOVE TO FLASH HASH --
|
||||
<div class="error">Please select or enter an answer. (The character limit for a textarea answer is 1000)</div>
|
||||
|
||||
</div>
|
@ -8,7 +8,7 @@
|
||||
<%= form_tag(post_question_path) do %>
|
||||
<main class="questions_tpl">
|
||||
<h2 class="question-text"><%= @question.question %></h2>
|
||||
<%= render partial: "questions/#{@question.input_type}" %>
|
||||
<%= render partial: @question.input_type %>
|
||||
|
||||
<% if @status.on_summary %>
|
||||
|
||||
|
Reference in New Issue
Block a user