<commit_before><h2>New Topic</h2>

<div style="margin: 1em 0;">
  <div id="preview" style="display: none; margin: 1em 0;">
  </div>

  <div id="reply">
    <% form_tag({:action => "create"}) do %>
      <%= hidden_field "forum_post", "parent_id", :value => params["parent_id"] %>
      <table>
        <tr>
          <td><label for="forum_post_title">Title</label></td>
          <td><%= text_field "forum_post", "title", :size => 60 %></td>
        </tr>
        <tr>
          <td><label for="forum_post_body">Body</label></td>
          <td><%= text_area "forum_post", "body", :rows => 10, :cols => 60 %></td>
        </tr>
        <tr>
          <td colspan="2"><%= submit_tag "Post" %><%= submit_to_remote "preview", "Preview", :url => {:action => "preview"}, :update => "preview", :method => :get, :success => "$('preview').show()" %></td>
        </tr>
      </table>
    <% end %>
  </div>
  
</div>

<% content_for("subnavbar") do %>
  <li><%= link_to "List", :action => "index" %></li>
  <li><%= link_to "Help", :controller => "help", :action => "forum" %></li>
<% end %><commit_msg>focus subject field in forum/new<commit_after><h2>New Topic</h2>

<div style="margin: 1em 0;">
  <div id="preview" style="display: none; margin: 1em 0;">
  </div>

  <div id="reply">
    <% form_tag({:action => "create"}) do %>
      <%= hidden_field "forum_post", "parent_id", :value => params["parent_id"] %>
      <table>
        <tr>
          <td><label for="forum_post_title">Title</label></td>
          <td><%= text_field "forum_post", "title", :size => 60 %></td>
        </tr>
        <tr>
          <td><label for="forum_post_body">Body</label></td>
          <td><%= text_area "forum_post", "body", :rows => 10, :cols => 60 %></td>
        </tr>
        <tr>
          <td colspan="2"><%= submit_tag "Post" %><%= submit_to_remote "preview", "Preview", :url => {:action => "preview"}, :update => "preview", :method => :get, :success => "$('preview').show()" %></td>
        </tr>
      </table>
    <% end %>
  </div>
  
</div>

<% content_for("subnavbar") do %>
  <li><%= link_to "List", :action => "index" %></li>
  <li><%= link_to "Help", :controller => "help", :action => "forum" %></li>
<% end %>

<script type="text/javascript">
  $("forum_post_title").focus();
</script>
{'fraction_non_alphanumeric': 0.2529592284085927, 'fraction_numerical': 0.011398509425690487, 'mean_word_length': 3.075, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 121, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5497119', 'n_tokens_mistral': 883, 'n_tokens_neox': 802, 'n_words': 186}