2014-04-26 01:50:32 +00:00
|
|
|
<h3><%= @week.contest if @week.contest %></h3>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-26 01:50:32 +00:00
|
|
|
<%= form_for @week, html: { class: 'square' } do |f| %>
|
|
|
|
<%= render 'shared/errors', messages: @week.errors.full_messages %>
|
|
|
|
<%= f.hidden_field :contest_id %>
|
|
|
|
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :name %>
|
|
|
|
<%= f.text_field :name %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :start_date %>
|
|
|
|
<%= f.date_select :start_date %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :map1_id, "1st map" %>
|
|
|
|
<%= f.select :map1_id, @week.contest.maps.basic.collect{|m| [m.name, m.id]} %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :map2_id, "2nd map" %>
|
|
|
|
<%= f.select :map2_id, @week.contest.maps.basic.collect{|m| [m.name, m.id]} %>
|
|
|
|
</div>
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.submit 'Save Week' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|