New challenge

<%= form_for @challenge do |f| %> <%= f.error_messages %> <%= f.hidden_field :contester1_id %> <%= f.hidden_field :contester2_id %>
<% if @challenge.errors.empty? or @challenge.server %>

<%= namelink @challenge.contester1.team %> vs <%= namelink @challenge.contester2.team %>

<%= f.label :match_time %>
<%= f.datetime_select :match_time %>

<%= f.check_box :mandatory %> <%= f.label :mandatory %> ( Default time will be following Sunday <%= @challenge.contester1.contest.default_time.strftime("%H:%M") %> )

<%= f.label :server_id %>
<%= f.select :server_id, Server.hlds.active.collect{|c| [c.name, c.id]} %>

<%= f.label :map1_id, "Your Map" %>
<%= f.select :map1_id, @challenge.contester1.contest.maps.basic.collect{|m| [m.name, m.id]} %>

<%= f.label :details, "Information for the opponent" %>
<%= f.text_area :details, :cols => 40, :rows => 7 %>

<%= f.submit 'Create' %>

<% end %>
<% end %>
<%= link_to 'Back', @challenge.contester1.contest %>