refactored dtext field helper

This commit is contained in:
albert
2011-10-21 17:45:49 -04:00
parent e8ac9cfcc1
commit 0eb665af0d
11 changed files with 38 additions and 41 deletions

View File

@@ -1,23 +1,9 @@
<div id="form-content">
<%= error_messages_for("forum_post") %>
<%= error_messages_for("forum_post") %>
<%= simple_form_for(@forum_post) do |f| %>
<%= f.input :topic_id, :as => :hidden %>
<%= f.input :body %>
<%= simple_form_for(@forum_post) do |f| %>
<%= f.input :topic_id, :as => :hidden %>
<%= dtext_field "forum_post", "body" %>
<%= f.button :submit, "Submit" %>
<%= f.button :submit, "Preview" %>
<% end %>
</div>
<div id="form-aside">
<div id="preview">
<div class="content dtext">
</div>
<p><a href="#" name="toggle-preview">Hide</a></p>
</div>
<div id="dtext-help">
<%= render "dtext/help" %>
</div>
</div>
<%= f.button :submit, "Submit" %>
<%= dtext_preview_button "forum_post", "body" %>
<% end %>