Newer
Older
dmpopidor / app / views / annotations / _new_edit.html.erb
<!--edit/add annotations. question is passed as an argument-->
<%= form_tag options[:url], method: options[:method] do %>
  <div class="row">
    <div class="form-group col-md-10">
      <%= label_tag :example_answer_text, _('Example answer'), class: "control-label" %>
      <%= text_area_tag :example_answer_text, (example_answer.present? ? example_answer.text : ''), class: "question" %>
    </div>

    <div class="form-group col-md-10">
      <%= label_tag :guidance_text, _('Guidance'), class: 'control-label' %>
      <%= text_area_tag :guidance_text, (guidance.present? ? guidance.text : ''), class: 'question' %>
    </div>

    <div class="form-group col-md-10">
      <div class="pull-right">
        <%= submit_tag _('Save'), class: 'btn btn-primary' %>
        <%= hidden_field_tag :question_id, question.id, class: "question_id" %>
        <%= link_to _('Cancel'), "#annotations_div_#{question.id}", class: 'btn cancel btn-default cancel_edit_annotations', role: 'button' %>
      </div>
    </div>
  </div>
<% end %>