summaryrefslogtreecommitdiff
path: root/app/views/tournaments/_form.html.erb
blob: 38855a02498defaa9c304fbe33fa9f0aa4816acd (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<%= form_for(@tournament) do |f| %>
  <% if @tournament.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@tournament.errors.count, "error") %> prohibited this tournament from being saved:</h2>

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

  <div class="field">
    <%= f.label :name %><br>
    <%= f.text_field :name %>
  </div>
  <div class="field">
    <%= f.label :game_id %><br>
    <%= f.text_field :game_id %>
  </div>
  <div class="field">
    <%= f.label :status %><br>
    <%= f.number_field :status %>
  </div>
  <div class="field">
    <%= f.label :min_players_per_team %><br>
    <%= f.number_field :min_players_per_team %>
  </div>
  <div class="field">
    <%= f.label :max_players_per_team %><br>
    <%= f.number_field :max_players_per_team %>
  </div>
  <div class="field">
    <%= f.label :min_teams_per_match %><br>
    <%= f.number_field :min_teams_per_match %>
  </div>
  <div class="field">
    <%= f.label :max_teams_per_match %><br>
    <%= f.number_field :max_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.check_box :randomized_teams %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>