<commit_before><%- taxon_change ||= @taxon_change -%>
<% taxon_change_type = taxon_change.class.name %>
<% form_for(taxon_change) do |f| %>
  <%= error_messages_for :taxon_change %>
  
  <% if taxon_change.new_record? -%>
    <fieldset class="column span-24">
      <legend>Split or Merge?</legend>
      <%= f.radio_button :type, 'TaxonSplit', { :checked => true } %> <%= f.label :type, 'Split' %>
      <%= f.radio_button :type, 'TaxonMerge' %> <%= f.label :type, 'Merge' %>
      <%= f.radio_button :type, 'TaxonSwap' %> <%= f.label :type, 'Swap' %>
    </fieldset>
  <% end %>

  <fieldset class="column span-24">
    <% if taxon_change.new_record? -%>
      <legend>Input taxon (for split) or output taxon (for merge or swap)</legend>
    <% else %>
      <legend><%= taxon_change_type == 'TaxonSplit' ? "Input taxon" : "Output taxon" %></legend>
    <% end %>
    <div class="stacked column span-24">
      <div class="column span-24">
        <%= f.label :taxon_id, 'Taxon ID' %><br/>
        <%= f.text_field :taxon_id, :class => 'text' %><br/>

        <%= label_tag :taxon_name %><br/>
        <%= text_field_tag :taxon_name, taxon_change.taxon ? taxon_change.taxon.name : '', :id => 'taxon_name', :class => 'text' %>
        <%= link_to_function "Browse all species", "$('#taxonchooser').jqmShow();" %>
        <div class="description">
          This is a more convenient way to find a taxon ID. It's the taxon ID
          that actually gets saved. This search only works for active taxa.
        </div>

      </div>
    </div>    
  </fieldset>

  <fieldset class="column span-24">
    <% if taxon_change.new_record? -%>
      <legend>Output taxa (for split) or input taxa (for merge or swap)</legend>
    <% else %>
      <legend><%= taxon_change_type == 'TaxonSplit' ? "Output taxa" : "Input taxa" %></legend><commit_msg>Bugfix: taxon_changes/edit taxon selector wasn't setting the right field due subclass id issues.<commit_after><%- taxon_change ||= @taxon_change -%>
<% taxon_change_type = taxon_change.class.name %>
<% form_for(taxon_change) do |f| %>
  <%= error_messages_for :taxon_change %>
  
  <% if taxon_change.new_record? -%>
    <fieldset class="column span-24">
      <legend>Split or Merge?</legend>
      <%= f.radio_button :type, 'TaxonSplit', { :checked => true } %> <%= f.label :type, 'Split' %>
      <%= f.radio_button :type, 'TaxonMerge' %> <%= f.label :type, 'Merge' %>
      <%= f.radio_button :type, 'TaxonSwap' %> <%= f.label :type, 'Swap' %>
    </fieldset>
  <% end %>

  <fieldset class="column span-24">
    <% if taxon_change.new_record? -%>
      <legend>Input taxon (for split) or output taxon (for merge or swap)</legend>
    <% else %>
      <legend><%= taxon_change_type == 'TaxonSplit' ? "Input taxon" : "Output taxon" %></legend>
    <% end %>
    <div class="stacked column span-24">
      <div class="column span-24">
        <%= f.label :taxon_id, 'Taxon ID' %><br/>
        <%= f.text_field :taxon_id, :class => 'text', :id => "taxon_change_taxon_id" %><br/>

        <%= label_tag :taxon_name %><br/>
        <%= text_field_tag :taxon_name, taxon_change.taxon ? taxon_change.taxon.name : '', :id => 'taxon_name', :class => 'text' %>
        <%= link_to_function "Browse all species", "$('#taxonchooser').jqmShow();" %>
        <div class="description">
          This is a more convenient way to find a taxon ID. It's the taxon ID
          that actually gets saved. This search only works for active taxa.
        </div>

      </div>
    </div>    
  </fieldset>

  <fieldset class="column span-24">
    <% if taxon_change.new_record? -%>
      <legend>Output taxa (for split) or input taxa (for merge or swap)</legend>
    <% else %>
      <legend><%= taxon_change_type == 'TaxonSplit' ? "Output taxa" : "Input taxa" %></legend>
{'fraction_non_alphanumeric': 0.18148245845423372, 'fraction_numerical': 0.005275652862041678, 'mean_word_length': 3.130718954248366, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 108, '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': '3854010', 'n_tokens_mistral': 1446, 'n_tokens_neox': 1306, 'n_words': 325}