diff options
-rw-r--r-- | public/regform.js | 21 | ||||
-rw-r--r-- | registration.rb | 8 |
2 files changed, 0 insertions, 29 deletions
diff --git a/public/regform.js b/public/regform.js deleted file mode 100644 index 197034e..0000000 --- a/public/regform.js +++ /dev/null @@ -1,21 +0,0 @@ -function fetch(url, id) { - var req = new XMLHttpRequest(); - req.onload = function() { - var element = document.getElementById(id); - var node = document.createElement("div"); - node.innerHTML = this.response; - element.appendChild(node); - }; - req.open("GET", url); - req.send(); -} - -window.onload = function() { - var num_songs = 0; - var add_song_button = document.getElementById('add-song-button'); - - add_song_button.onclick = function() { - num_songs += 1; - fetch(window.location + '/song/new/' + num_songs, 'form-songs'); - }; -}; diff --git a/registration.rb b/registration.rb index 009406a..e3bf571 100644 --- a/registration.rb +++ b/registration.rb @@ -15,14 +15,6 @@ class RegistrationApp < Sinatra::Base erb :index end - get '/member/new/:num' do - erb :member, :layout => false, :locals => { :member_number => params['num'], :member => Member.new } - end - - get '/song/new/:num' do - erb :song, :layout => false, :locals => { :song_number => params['num'], :song => Song.new } - end - post '/submit' do if request.form_data? @band = Band.new(request['band']) |