Newer
Older
dmpopidor / app / views / notes / _add.html.erb
<!--add note to question. question id is passed as an argument and plan id-->

<%
  new_note = Note.new
%>
<%= form_for( :new_note,
             url: notes_path,
             remote: true,
             html: {method: :post, class: "add_note_form roadmap-form"},
             id: "new_note_form_#{question.id}") do |f| %>
	<%= f.hidden_field :user_id, value: current_user.id %>
	<%= f.hidden_field :question_id, value: question.id %>
	<%= f.hidden_field :answer_id, value: answer.id %>
	<%= f.hidden_field :plan_id, value: plan_id %>

	<fieldset class="standard">
	  <%= label_tag "#{question.id}new_note_text", _('Add comments to share with collaborators') %>
	  <%= text_area_tag "#{question.id}new_note_text", nil, class: "tinymce_notes" %>
	  <input type="submit" class="form-submit new_comment_submit_button left-indent" value="<%= _('Save') %>" />
	</fieldset>
<% end %>