Fixed up new post form
added a cancel button
This commit is contained in:
@@ -1,26 +1,23 @@
|
||||
<div class="module">
|
||||
<div class="module_header"><%= action_name.humanize %> Post</div>
|
||||
<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 %>
|
||||
<div class="fieldset">
|
||||
<span class="label indent smaller">
|
||||
<%= f.label :body %><br />
|
||||
<small>(Required)</small>
|
||||
</span>
|
||||
<span class="input indent smaller"><%= f.text_area :body, :cols => 60, :rows => 15 %></span>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<%= f.label :body %>
|
||||
<%= f.text_area :body, :width => "80%", :rows => 15 %>
|
||||
</div>
|
||||
<div class="module_footer">
|
||||
<div class="fieldset">
|
||||
<span class="input"><%= f.submit "submit" %> or <%= link_to "cancel", topic_path(@post.topic) %></span>
|
||||
<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>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user