moved question partials

This commit is contained in:
Mark Moser
2016-07-28 16:49:26 -05:00
parent 4f99d4eb12
commit f9930ce531
5 changed files with 1 additions and 1 deletions

View 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>

View 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>

View 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>

View 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>

View File

@ -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 %>