<!--edit note to question. note passed as argument-->
<%= form_for(note, :url => {:controller => :notes, :action => :archive } , :html => { :method => :put, :class => "archive_note_form", :id => "archive_note_form_#{note.id}"}) do |f| %>
<%= f.hidden_field :id, :value => note.id %>
<%= f.hidden_field :archived_by, :value => current_user.id %>
<%= render :partial => "view_note", locals: {note: note} %>
<% if current_user.id == note.user_id then %>
<%= t('helpers.notes.archive_own_note_question')%>
<% button_label = t("helpers.notes.archive_own_comment_button_label") %>
<% else%>
<%= t("helpers.notes.archive_note_question")%>
<% button_label = t("helpers.notes.archive_comment_button_label") %>
<%end%>
<!-- submit buttons -->
<div class="move_2_right">
<% question = Question.find(note.question_id)%>
<%= hidden_field_tag :plan_id, note.plan_id, :class => "plan_id" %>
<%= hidden_field_tag :note_id, note.id, :class => "comment_id" %>
<%= hidden_field_tag :section_id, question.section_id, :class => "section_id" %>
<%= f.submit button_label, :class => "btn btn-primary archive_comment_submit_button" %>
<%= hidden_field_tag :note_id, note.id, :class => "comment_id" %>
<%= link_to t("helpers.submit.cancel"), "#", :class => "cancel_archive_comment btn cancel" %>
</div>
<br>
<%end%>