2014-04-20 01:29:52 +00:00
|
|
|
<h1>New Topic</h1>
|
|
|
|
|
|
|
|
<%= form_for @topic, html: { multipart: true, class: 'square' } do |f| %>
|
|
|
|
<%= render 'shared/errors', messages: @topic.errors.full_messages %>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
|
|
|
<%= f.hidden_field :forum_id %>
|
|
|
|
|
2014-04-20 01:29:52 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :forum %>
|
|
|
|
<div class="inputs">
|
|
|
|
<%= @topic.forum %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-20 01:29:52 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :title %>
|
|
|
|
<%= f.text_field :title, size: 50 %>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-20 01:29:52 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :post %>
|
|
|
|
<%= f.text_area :first_post, rows: 15 %>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-20 01:29:52 +00:00
|
|
|
<div class="controls">
|
|
|
|
<%= f.submit 'Create Topic' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|