From def21c442c6e4b52b50f852cedd3e8bcaf436f9d Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Mon, 3 Mar 2014 13:17:02 -0500 Subject: Changed the views for tournament a little more. --- app/assets/javascripts/ajax.js | 5 +++-- app/views/tournaments/index.html.erb | 2 +- app/views/tournaments/new.html.erb | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/ajax.js b/app/assets/javascripts/ajax.js index 2b2bb3e..475dddc 100644 --- a/app/assets/javascripts/ajax.js +++ b/app/assets/javascripts/ajax.js @@ -3,9 +3,10 @@ function populate() { //make a form element var e = document.getElementById("tournament_id"); var gameType = e.options[e.selectedIndex].text; - if (gameType != "") { + if (gameType != "Select a Game Type") { + alert(gameType + " was Selected!"); //populate optionArray - + //select * from tournament_settings where gametype = GameType for(var option in optionArray){ //identify the number of ; diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb index 73b064e..6006cad 100644 --- a/app/views/tournaments/index.html.erb +++ b/app/views/tournaments/index.html.erb @@ -24,4 +24,4 @@
-<%= link_to 'New Tournament', new_tournament_path %> +<%= link_to 'New Tournament', new_tournament_path, :class => "btn btn-warning btn-lg" %> diff --git a/app/views/tournaments/new.html.erb b/app/views/tournaments/new.html.erb index de80fb7..dee18fb 100644 --- a/app/views/tournaments/new.html.erb +++ b/app/views/tournaments/new.html.erb @@ -7,6 +7,6 @@

-<%= link_to 'Create Tournament', "create", :class => "btn btn-warning btn-lg", :role => "submit" %> +<%= link_to 'Create Tournament', "#", :class => "btn btn-warning btn-lg" %> <%= link_to 'Back', tournaments_path %> -- cgit v1.2.3-2-g168b