summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-10-30 14:33:46 +0100
committerHarald Eilertsen <haraldei@anduin.net>2015-10-30 14:33:46 +0100
commit0863fd869b6ef23501e5c67249f3be661af80e07 (patch)
treeaaf0440e84ddb2da2bfe62c5ffd5319df946816a
parent55983d657c857077ff0144e4c18d84194597b67e (diff)
downloadnorsk-urskog-registrations-0863fd869b6ef23501e5c67249f3be661af80e07.tar.gz
norsk-urskog-registrations-0863fd869b6ef23501e5c67249f3be661af80e07.tar.bz2
norsk-urskog-registrations-0863fd869b6ef23501e5c67249f3be661af80e07.zip
Remove ajax code for adding songs/members.
-rw-r--r--public/regform.js21
-rw-r--r--registration.rb8
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'])