skill-assessment-app/app/views/admin/result/_comment_form.html.erb

24 lines
585 B
Plaintext
Raw Normal View History

2017-02-13 18:08:51 -06:00
<% if comment.id.nil? %>
<%= form_for comment, url: admin_create_comment_path(test_hash: test_hash), method: :post do |form| %>
2017-03-20 10:57:50 -05:00
<div>
2017-02-13 18:08:51 -06:00
<%= form.label :message, "New Comment" %>
<%= form.text_area :message %>
</div>
<%= submit_tag "Save Comment" %>
<% end %>
<% else %>
<%= form_for comment, url: admin_update_comment_path(test_hash: test_hash, id: comment.id), method: :post do |form| %>
2017-03-20 10:57:50 -05:00
<div>
2017-02-13 18:08:51 -06:00
<%= form.label :message, "Update Comment" %>
<%= form.text_area :message %>
</div>
<%= submit_tag "Update" %>
<% end %>
2017-02-10 15:46:43 -06:00
<% end %>