summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-04-20 00:04:55 -0400
committerAndrewMurrell <amurrel@purdue.edu>2014-04-20 00:06:35 -0400
commit16750bab527d574867a64e3092f7335a028195cb (patch)
tree4ed32327645b0508a1dd52982a52f4ae6ccf56e7 /app
parent4a492f3036ad05718e16289436f9840b4fa5331e (diff)
Made settings work for all the different types, CSS needs to be updated.
Diffstat (limited to 'app')
-rw-r--r--app/views/tournaments/_selected.html.erb12
1 files changed, 8 insertions, 4 deletions
diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb
index d37c741..8bb0532 100644
--- a/app/views/tournaments/_selected.html.erb
+++ b/app/views/tournaments/_selected.html.erb
@@ -19,15 +19,18 @@
<%= fields_for "tournament[preferences]", @tournament.preferences do |setting_fields| %>
<% @game.settings.each do |setting| %>
+ <p>
+ <%= setting_fields.label setting.name %>
+ <br>
<% case setting.stype %>
<% when 0 %>
- <%= setting_fields.text_field( setting.name, :name ) %>
+ <%= setting_fields.text_field( setting.name ) %>
<% when 1 %>
- <%= setting_fields.text_area( setting.name, setting.name ) %>
+ <%= setting_fields.text_area( setting.name ) %>
<% when 2 %>
- <%= setting_fields.collection_radio_buttons( setting.name, setting.type_opt.split(',') ) %>
+ <%= setting_fields.collection_radio_buttons( setting.name, setting.type_opt.split(','), :first, :last, { item_wrapper_tag: false } ) %>
<% when 3 %>
- <%= setting_fields.collection_check_boxes( setting.name, setting.type_opt.split(',') ) %>
+ <%= setting_fields.collection_check_boxes( setting.name, setting.type_opt.split(','), :first, :last, { item_wrapper_tag: false } ) %>
<% when 4 %>
<%= setting_fields.radio_button( setting.name, "true" ) %>
<%= setting_fields.radio_button( setting.name, "false" ) %>
@@ -35,6 +38,7 @@
<%= setting_fields.select( setting.name, setting.type_opt.split(',') ) %>
<% end %>
<% end %>
+ </p>
<% end %>
<%= f.submit %>
<% end %>