ensl.org/app/views/contests/new.html.erb

33 lines
1,010 B
Text

<h1>New Contest</h1>
<%= form_for @contest, html: { class: 'square' } do |f| %>
<%= render 'shared/errors', messages: @contest.errors.full_messages %>
<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 %>