summaryrefslogtreecommitdiff
path: root/app/views/games/_form.html.erb
blob: 8941c59feca79fcfbbc5fbcc189bf9c5ca45ae1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<%= form_for(@game) do |f| %>
  <% if @game.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@game.errors.count, "error") %> prohibited this game from being saved:</h2>

      <ul>
      <% @game.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :name %><br>
    <%= f.text_area :name %>
  </div>
  <div class="field">
    <%= f.label :players_per_team %><br>
    <%= f.number_field :players_per_team %>
  </div>
  <div class="field">
    <%= f.label :teams_per_match %><br>
    <%= f.number_field :teams_per_match %>
  </div>
  <div class="field">
    <%= f.label :set_rounds %><br>
    <%= f.number_field :set_rounds %>
  </div>
  <div class="field">
    <%= f.label :randomized_teams %><br>
    <%= f.number_field :randomized_teams %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>