Newer
Older
dmpopidor / app / views / notes / _new.html.erb
<!-- add note to question. question id is passed as an argument and plan id-->
<%= form_for(Note.new, url: notes_path) 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 %>
  <div class="form-group">
    <%= f.label(:text, _('Add comments to share with collaborators')) %>
    <%= f.text_area(:text, class: 'form-control note', id: "note-#{question.id}") %>
  </div>
  <%= f.button(_('Create'), class: "btn btn-default", type: "submit") %>
<% end %>