Markup fix

This commit is contained in:
Derek Montgomery 2016-08-02 16:20:59 -05:00
parent 02007b8871
commit fe4bcef4ae

View File

@ -6,33 +6,31 @@
%> %>
<%= form_for(@answer, url: post_answer_path(@answer.id), html:{method: :post, id: 'answer-form', data: {qid: @question.question_id}}) do |form| %> <%= form_for(@answer, url: post_answer_path(@answer.id), html:{method: :post, id: 'answer-form', data: {qid: @question.question_id}}) do |form| %>
<main class="questions_tpl"> <main class="answer-sec <%= @question.input_type %>-type questions_tpl" data-qid="<%= @question.question_id %>">
<article class="answer-sec <%= @question.input_type %>-type" data-qid="<%= @question.question_id %>"> <h2 class="question-text"><%= @question.question %></h2>
<h2 class="question-text"><%= @question.question %></h2>
<div class="content-well"> <div class="content-well">
<%= hidden_field_tag 'answer[question_id]', @question.question_id %> <%= hidden_field_tag 'answer[question_id]', @question.question_id %>
<%= hidden_field_tag 'answer[answer_id]', @question.answer_id %> <%= hidden_field_tag 'answer[answer_id]', @question.answer_id %>
<%= render partial: @question.input_type, locals: {question: @question, form: form} %> <%= 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> </div>
<% if @status.on_summary %> <% else %>
<div class="btn-container-summary"> <div class="btn-container-left">
<input type="submit" name="update" value="Save and return to summary"> <input type="submit" name="save" value="Save">
</div> </div>
<div class="btn-container-right">
<input type="submit" name="submit" value="Next">
</div>
<% else %> <% end %>
<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 %>
</article>
</main> </main>
<% end %> <% end %>