Newer
Older
dmpopidor / app / views / annotations / _edit_annotation.html.erb
<!--edit annotation. question is passed as an argument-->
<%= form_for( annotation, url: admin_update_annotation_path(annotation.id), html: { method: :put}) do |f| %>
  <%= f.hidden_field :org_id, value: current_user.org_id %>

  <table class="dmp_details_table phase">
    <tr>
      <td class="first_template"><%= _('Example of Answer')%></td>
      <td>
        <ul>
          <li><%= f.text_area :text, rows: 5 %></li>
        </ul>
      </td>
    </tr>
  </table>
  <br/>

  <!-- submit buttons -->
  <div class="move_2_right">
    <%= f.submit _('Save'), class: 'btn btn-primary' %>
    <%= link_to _('Delete'), admin_destroy_annotation_path(id: annotation.id),
      confirm: _("You are about to delete an example answer for '%{question_text}'. Are you sure?") % { :question_text => question.text }, method: :delete, class: "btn btn-primary"%>
    <%= hidden_field_tag :question_id, question.id, class: "question_id" %>
    <%= link_to _('Cancel'), '#', class: 'btn cancel cancel_edit_suggested_answer' %>
  </div>
<% end %>