<%= form_for(@match) do |f| %> <% if @match.errors.any? %>

<%= pluralize(@match.errors.count, "error") %> prohibited this match from being saved:

<% end %>

Bout: <%= @match.bout_number %>

Round: <%= @match.round %>

Weight: <%= @match.weight_max %> lbs

<%= @w1.name %> - <%= @w1.school.name %>
Last Match: <%= if @w1.last_match != nil then time_ago_in_words(@w1.last_match.updated_at) end%>
<%= @w2.name %> - <%= @w2.school.name %>
Last Match: <%= if @w2.last_match != nil then time_ago_in_words(@w2.last_match.updated_at) end%>
<%= @w1.name %> Stats:
<%= f.text_area :w1_stat, cols: "30", rows: "10" %>
<%= @w2.name %> Stats:
<%= f.text_area :w2_stat, cols: "30", rows: "10" %>
<%= @w1.name %> Scoring
<%= @w2.name %> Scoring
<%= @w1.name %> Choice
<%= @w2.name %> Choice
<%= @w1.name %> Warnings
<%= @w2.name %> Warnings
Match Options



Match Results


<%= f.label "Win Type" %>
<%= f.select(:win_type, Match::WIN_TYPES) %>

<%= f.label "Winner" %> Please choose the winner
<%= f.collection_select :winner_id, @wrestlers, :id, :name %>

<%= f.label "Final Score" %> Also put pin time here if applicable. If default or forfeit, leave blank. Example: 7-2, 17-2, or 2:34
<%= f.text_field :score %>

<%= f.hidden_field :finished, :value => 1 %> <%= f.hidden_field :round, :value => @match.round %>
<%= f.submit onclick: "return confirm('Is the name of the winner ' + document.getElementById('match_winner_id').options[document.getElementById('match_winner_id').selectedIndex].text + '?')", :class=>"btn btn-success" %>
<% end %>