<!--add note to question. question id is passed as an argument and plan id-->

<%
  new_note = Note.new
  questionid = question.id
%>

<%= form_for( :new_note,
             url: notes_path,
             remote: true,
             method: :post,
             id: "new_note_form_#{questionid}",
             class: "add_note_form") do |f| %>
	<%= f.hidden_field :user_id, value: current_user.id %>
	<%= f.hidden_field :question_id, value: questionid %>
	<%= f.hidden_field :answer_id, value: answer.id %>
	<%= f.hidden_field :plan_id, value: plan_id %>

	<fieldset>
		<%= label_tag "#{questionid}new_note_text", _('Share note with collaborators') %>
	  <%= text_area_tag "#{questionid}new_note_text", nil, class: "tinymce" %>
	  <%= tinymce :content_css => asset_path("application.css"), :setup => "function(editor){editor.on('change', function(e){$.fn.check_textarea(editor)});}" %>
	</fieldset>
	
	<br/>
	<!-- submit button -->
	<div class="move_2_right">
    <%= f.submit _('Save'), class: "form-submit inline new_comment_submit_button" %>
	</div>
    </br>
<% end %>
