<commit_before><%= form_for(setup_registrant_choices(@registrant)) do |f| %>
  <% if @registrant.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@registrant.errors.count, "error") %> prohibited this registrant from being saved:</h2>

      <ul>
        <% @registrant.errors.each do |attribute,error_message| %>
          <% next if attribute == :gender_male %>
          <% next if attribute == :gender_female %>
          <% next if "#{attribute}" == "registrant_event_sign_ups.signed_up" %>
          <% next if "#{attribute}" == "registrant_event_sign_ups.event_category_id" %>
          <% if "#{attribute}" == "registrant_event_sign_ups.base" %>
            <li><%= error_message %></li>
          <% else %>
            <li><%= @registrant.errors.full_message(attribute, error_message )%></li>
          <% end %>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="data_block">
    <%= f.hidden_field :competitor %>
    <h2><%= @registrant.competitor ? "Competitor" : "Non-Competitor" %></h2>
    <% unless @registrant.new_record? %>
      <div class="delete_link">
        <% if can? :delete, @registrant %>
          <%= link_to 'Delete', registrant_path(@registrant), :confirm => "Are you sure you want to delete this registration", :method => :delete %>
        <% end %>
      </div>
    <% end %>
    <div class="required">Required fields</div>
    <fieldset class="data_block">
      <legend>Base Details</legend>
      <span>
        <%= f.label :first_name, 'Name', :class => "required" %>
        <%= f.text_field :first_name, :placeholder => 'First', :size => 12, :autofocus => "true" %>
        <%= f.text_field :middle_initial, :size => 1 %>
        <%= f.text_field :last_name, :placeholder => 'Last', :size => 15 %>
      </span>
      <span>
        <%= f.label :birthday, :class => "required" %>
        <%= f.date_select :birthday, {:start_year => 1920, :end_year => Time.now.year, :include_blank => true, :order => [:month, :day, :year]} %>
      </span>
      <span>
        <%= f.label :gender_male, 'Male', :class => "required" %>
        <%= f.radio_button :gender, 'Male' %>
        <%= f.label :gender_female, 'Female', :class => "required" %>
        <%= f.radio_button :gender, 'Female' %>
      </span>
      <span>
        <%= f.label :club, "Primary Team or Club Name" %>
        <%= f.text_field :club %><br />
        <%= f.label :club_contact, "Primary Team or Club Contact" %>
        <%= f.text_field :club_contact, :size => 25  %>
      </span>
      <span>
        <%= f.label :usa_member_number, "USA Membership Number" %>
        <%= f.text_field :usa_member_number, :size => 5, :class => "ui-tooltip", :title => "A USA membership is required to participate at #{EventConfiguration.short_name}" %><br />
      </span>
    </fieldset>
    <%= render :partial => "registration_periods/list", :locals => {:competitor => @registrant.competitor } %>

    <% unless @categories.nil? %>
      <%= render :partial => "/attending/events", :locals => {:registrant => @registrant, :categories => @categories, :f => f } %>
    <% end %>

    <div class="data_block">
      <%= render :partial => "contact_info", :locals => { :f => f, :other_registrant => @other_registrant } %>
    </div>

  </div>
  <div class="actions">
    <% if @registrant.competitor %>
      <%= f.submit 'Continue (Expenses...)', :class => "competitor registration_button" %>
    <% else %>
      <%= f.submit 'Continue (Expenses...)', :class => "noncompetitor registration_button" %>
    <% end %>
  </div>
<% end %>
<commit_msg>adjust can? statement to match ability (to delete registrant)<commit_after><%= form_for(setup_registrant_choices(@registrant)) do |f| %>
  <% if @registrant.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@registrant.errors.count, "error") %> prohibited this registrant from being saved:</h2>

      <ul>
        <% @registrant.errors.each do |attribute,error_message| %>
          <% next if attribute == :gender_male %>
          <% next if attribute == :gender_female %>
          <% next if "#{attribute}" == "registrant_event_sign_ups.signed_up" %>
          <% next if "#{attribute}" == "registrant_event_sign_ups.event_category_id" %>
          <% if "#{attribute}" == "registrant_event_sign_ups.base" %>
            <li><%= error_message %></li>
          <% else %>
            <li><%= @registrant.errors.full_message(attribute, error_message )%></li>
          <% end %>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="data_block">
    <%= f.hidden_field :competitor %>
    <h2><%= @registrant.competitor ? "Competitor" : "Non-Competitor" %></h2>
    <% unless @registrant.new_record? %>
      <div class="delete_link">
        <% if can? :destroy, @registrant %>
          <%= link_to 'Delete', registrant_path(@registrant), :confirm => "Are you sure you want to delete this registration", :method => :delete %>
        <% end %>
      </div>
    <% end %>
    <div class="required">Required fields</div>
    <fieldset class="data_block">
      <legend>Base Details</legend>
      <span>
        <%= f.label :first_name, 'Name', :class => "required" %>
        <%= f.text_field :first_name, :placeholder => 'First', :size => 12, :autofocus => "true" %>
        <%= f.text_field :middle_initial, :size => 1 %>
        <%= f.text_field :last_name, :placeholder => 'Last', :size => 15 %>
      </span>
      <span>
        <%= f.label :birthday, :class => "required" %>
        <%= f.date_select :birthday, {:start_year => 1920, :end_year => Time.now.year, :include_blank => true, :order => [:month, :day, :year]} %>
      </span>
      <span>
        <%= f.label :gender_male, 'Male', :class => "required" %>
        <%= f.radio_button :gender, 'Male' %>
        <%= f.label :gender_female, 'Female', :class => "required" %>
        <%= f.radio_button :gender, 'Female' %>
      </span>
      <span>
        <%= f.label :club, "Primary Team or Club Name" %>
        <%= f.text_field :club %><br />
        <%= f.label :club_contact, "Primary Team or Club Contact" %>
        <%= f.text_field :club_contact, :size => 25  %>
      </span>
      <span>
        <%= f.label :usa_member_number, "USA Membership Number" %>
        <%= f.text_field :usa_member_number, :size => 5, :class => "ui-tooltip", :title => "A USA membership is required to participate at #{EventConfiguration.short_name}" %><br />
      </span>
    </fieldset>
    <%= render :partial => "registration_periods/list", :locals => {:competitor => @registrant.competitor } %>

    <% unless @categories.nil? %>
      <%= render :partial => "/attending/events", :locals => {:registrant => @registrant, :categories => @categories, :f => f } %>
    <% end %>

    <div class="data_block">
      <%= render :partial => "contact_info", :locals => { :f => f, :other_registrant => @other_registrant } %>
    </div>

  </div>
  <div class="actions">
    <% if @registrant.competitor %>
      <%= f.submit 'Continue (Expenses...)', :class => "competitor registration_button" %>
    <% else %>
      <%= f.submit 'Continue (Expenses...)', :class => "noncompetitor registration_button" %>
    <% end %>
  </div>
<% end %>

{'fraction_non_alphanumeric': 0.19589060113841456, 'fraction_numerical': 0.004442593363876163, 'mean_word_length': 2.866881374127751, 'pattern_counts': {'":': 0, '<': 177, '<?xml version=': 0, '>': 245, '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': '1540986', 'n_tokens_mistral': 2583, 'n_tokens_neox': 2333, 'n_words': 518}