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

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

  <div class="field">
    <%= f.label :name %><br>
    <%= f.text_field :name %>
  </div>
  <div class="field">
    <%= f.label :address %><br>
    <%= f.text_field :address %>
  </div>
  <div class="field">
    <%= f.label :director %><br>
    <%= f.text_field :director %>
  </div>
  <div class="field">
    <%= f.label :director_email %><br>
    <%= f.text_field :director_email %>
  </div>
  <div class="field">
    <%= f.label :date %> (YYYY-MM-DD)<br>
    <%= f.date_field :date %>
  </div>
  <div>
    <%= f.label :tournament_type %><br>
    <%= f.select :tournament_type, @tournament.tournament_types %>
  </div>
  <br>
  <div>
    See About page for information on tournament types: <%= link_to "About", "/static_pages/about" %>
    <p>For double elimination tournaments, 1-6 places 1st through 6th and 1-8 places 1st through 8th.</p>
  </div>
    <br>
    <br>
  <div class="field">
    <%= f.label "Information is public" %> <br />
    <%= f.check_box :is_public %> <br />
  </div>
  <div>
    Leave this unchecked until you're ready to share seeding info, brackets, and lineups.
  </div>
  <br>
  <br>
  <div class="actions">
    <%= f.submit 'Submit',:class=>"btn btn-success" %>
  </div>
<% end %>
