2014-03-23 00:22:25 +00:00
|
|
|
<h1>New Contest</h1>
|
|
|
|
|
2014-04-26 02:42:16 +00:00
|
|
|
<%= form_for @contest, html: { class: 'square' } do |f| %>
|
|
|
|
<%= render 'shared/errors', messages: @contest.errors.full_messages %>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-26 02:42:16 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :name %>
|
|
|
|
<%= f.text_field :name %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :contest_type %>
|
|
|
|
<%= f.select :contest_type, @contest.types.invert %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :start %>
|
|
|
|
<%= f.datetime_select :start, datetime_separator: '', time_separator: '' %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :end %>
|
|
|
|
<%= f.datetime_select :end, datetime_separator: '', time_separator: '' %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :status %>
|
|
|
|
<%= f.select :status, @contest.statuses.invert %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :default_time %>
|
|
|
|
<%= f.time_select :default_time, time_separator: '' %>
|
|
|
|
</div>
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.submit 'Save' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|