Files
forum/app/views/posts/_form.html.erb

24 lines
832 B
Plaintext
Executable File

<div class="module">
<div class="module_header">
Re: <%= @post.topic.title %>
</div>
<div class="module_subheader smaller"></div>
<div class="module_body">
<%= form_for [@topic, @post] do |f| %>
<% if @post.errors.any? %>
<% flash.now[:error] = @post.errors.full_messages.join(', and ') %>
<% end %>
<%= f.label :body %>
<%= f.cktext_area :body, :style => "width:98%", :rows => 15 %>
</div>
<div class="module_footer">
<span class="input">
<%= f.submit "Submit", :class =>"btn btn-primary"%>
<%= button_tag "Cancel", :confirm => 'Are you sure? Any changes will be lost.', :class => 'btn', :type => 'submit', :name => 'commit', :value => 'cancel' %>
</span>
<div class="clear"></div>
</div>
<% end %>
</div>
</div>