<h1><%= I18n.t("forums.new_topic") %></h1>

<% unless @topic.errors.empty? %>
<div class="flash alert">
  <p><%= I18n.t("general.errors_occured") %></p>
  <ul>
    <% @topic.errors.messages.each do |key, msg| %>
      <li><%= key %>: <%= msg %></li>
    <% end %>
  </ul>
</div>
<% end %>

<% form_for @topic, url(:topics, :create), :method => :post do |f| %>
  <%= f.hidden_field :forum_id, :value => @forum_id || params[:forum] %>

  <p>
    <%= f.label :title %><br/>
    <%= f.text_field :title %>
  </p>

  <p>
  <% f.fields_for :posts do |f2| %>
      <%= f2.label :content %><br/>
      <%= f2.text_area :content %>
    <% end %>
  </p>

  <p>
    <%= f.submit I18n.t("general.create") %>
  </p>
<% end %>

<h1><%= I18n.t("forums.new_topic") %></h1>

<% unless @topic.errors.empty? %>
<div class="flash alert">
  <p><%= I18n.t("general.errors_occured") %></p>
  <ul>
    <% @topic.errors.messages.each do |key, msg| %>
      <li><%= key %>: <%= msg %></li>
    <% end %>
  </ul>
</div>
<% end %>

<% form_for @topic, url(:topics, :create), :method => :post do |f| %>
  <%= f.hidden_field :forum_id, :value => @forum_id || params[:forum] %>

  <p>
    <%= f.label :title %><br/>
    <%= f.text_field :title %>
  </p>

  <% f.fields_for :posts do |f2| %>
    <p>
      <%= f2.label :content %><br/>
      <%= f2.text_area :content %>
    </p>
    <p>
      <%= f2.label :markup_language %>&nbsp;<%= f2.select(:markup_language, :options => Post::MARKUP_LANGUAGES) %>
    </p>
  <% end %>

  <p>
    <%= f.submit I18n.t("general.create") %>
  </p>
<% end %>

Allow selection of markup language on posting
Allow selection of markup language on posting
