<%= 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 %>

Bracket Position: <%= @match.bracket_position %>

Name: <%= @wrestler1_name %>
School: <%= @wrestler1_school_name %>
Last Match: <%= @wrestler1_last_match ? time_ago_in_words(@wrestler1_last_match.updated_at) : "N/A" %>
Name: <%= @wrestler2_name %>
School: <%= @wrestler2_school_name %>
Last Match: <%= @wrestler2_last_match ? time_ago_in_words(@wrestler2_last_match.updated_at) : "N/A" %>
<%= @wrestler1_name %> Stats:
<%= f.text_area :w1_stat, cols: "30", rows: "10" %>
<%= @wrestler2_name %> Stats:
<%= f.text_area :w2_stat, cols: "30", rows: "10" %>
<%= @wrestler1_name %> Scoring
<%= @wrestler2_name %> Scoring
<%= @wrestler1_name %> Choice
<%= @wrestler2_name %> Choice
<%= @wrestler1_name %> Warnings
<%= @wrestler2_name %> Warnings
Match Options



Match Results


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

<%= f.label "Overtime Type" %> Leave blank if not overtime. For High School the 1st overtime is SV-1, second overtime is TB-1, third overtime is UTB.
<%= f.select(:overtime_type, Match::OVERTIME_TYPES) %>

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

<%= f.label "Final Score" %> For decision, major, or tech fall put the score here in Number-Number format. If pin, put the accumulated pin time in the format MM:SS. If default, injury default, dq, bye, or forfeit, leave blank. Examples: 7-2, 17-2, 0:30, 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 %>