1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00
Files
wrestlingdev.com/app/views/tournaments/_form.html.erb

50 lines
1.4 KiB
Plaintext

<%= 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>
<%= f.hidden_field :user_id, :value => current_user.id %>
<br>
<br>
<div class="actions">
<%= f.submit 'Submit',:class=>"btn btn-success" %>
</div>
<% end %>