summaryrefslogtreecommitdiff
path: root/app/views/tournaments/new.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/tournaments/new.html.erb')
-rw-r--r--app/views/tournaments/new.html.erb14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/views/tournaments/new.html.erb b/app/views/tournaments/new.html.erb
index 3d6d142..1e80147 100644
--- a/app/views/tournaments/new.html.erb
+++ b/app/views/tournaments/new.html.erb
@@ -2,18 +2,18 @@
<h1>New Tournament</h1>
-<%= select_tag 'tournament_id', options_for_select(["Select a Game Type"] + Game.all.collect {|game| game.name}), :onchange => 'populate()' %> <%= link_to 'Select', 'new?game=1', :class => "btn btn-success btn-xs" %>
+<%= form_tag(new_tournament_path, method: "get") do %>
+ <%= select_tag('game',
+ options_from_collection_for_select(@games, 'id', 'name', @tournament.game.nil? || @tournament.game.id),
+ :prompt => "Select a Game Type") %>
+ <%= submit_tag("Select", :class => "btn btn-success btn-xs") %>
+<% end %>
-
-<br />
<div id='ajax-form'>
- <% if not @game.nil? %>
+ <% if not @tournament.game.nil? %>
<%= render 'selected' %>
<% end %>
</div>
-<br /><br />
-
-<%= link_to 'Select', 'selected', :class => "btn btn-success btn-xs" %>
<%= link_to 'Back', tournaments_path %>