<%= form_for(@competitor, html:{multipart:true}) do |f| %>
  <% if @competitor.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@competitor.errors.count, "error") %> prohibited this competitor from being saved:</h2>

      <ul>
      <% @competitor.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div>
    <strong>Submission jar</strong> (see <%= link_to "Help",   help_path %> for details)<br>
    
    <span class="ai">
      <%= f.file_field :ai, accept: 'application/jar' %>
    </span>
  </div>
<br>
  <div class="field">
    <%= f.label "Team name" %><br>
    <%= f.text_field :team %> - Brave enough to admit who you really are?
  </div>

  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>

<script type="text/javascript">
  $('#competitor_ai').bind('change',function() {
    var size_in_megabytes = this.files[0].size/1024/1024;
    if(size_in_megabytes > 5) {
      alert('Maximum file size is 5MB');
    }
  });
</script>
<%= form_for(@competitor, html:{multipart:true}) do |f| %>
  <% if @competitor.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@competitor.errors.count, "error") %> prohibited this competitor from being saved:</h2>

      <ul>
      <% @competitor.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div>
    <strong>Submission jar</strong> (This is NOT the standard submission file! see <%= link_to "Help",   help_path %> for details)<br>
    
    <span class="ai">
      <%= f.file_field :ai, accept: 'application/jar' %>
    </span>
  </div>
<br>
  <div class="field">
    <%= f.label "Team name" %><br>
    <%= f.text_field :team %> - Brave enough to admit who you really are?
  </div>

  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>

<script type="text/javascript">
  $('#competitor_ai').bind('change',function() {
    var size_in_megabytes = this.files[0].size/1024/1024;
    if(size_in_megabytes > 5) {
      alert('Maximum file size is 5MB');
    }
  });
</script>
Add stronger warning to NOT use standard submission
Add stronger warning to NOT use standard submission
