summaryrefslogtreecommitdiffstats
path: root/registration.rb
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-10-09 21:04:00 +0200
committerHarald Eilertsen <haraldei@anduin.net>2015-10-09 21:04:00 +0200
commitb65549d1e2f7df62c9f941ed92b00759351e0c5f (patch)
treeefa6c513d8c251f0fd869e73c34dfa9c6d1686d8 /registration.rb
parentbfc6d9a6ceed3a2ee9a38a1afa4dffec972eca83 (diff)
downloadnorsk-urskog-registrations-b65549d1e2f7df62c9f941ed92b00759351e0c5f.tar.gz
norsk-urskog-registrations-b65549d1e2f7df62c9f941ed92b00759351e0c5f.tar.bz2
norsk-urskog-registrations-b65549d1e2f7df62c9f941ed92b00759351e0c5f.zip
Use ajax to get member and song subforms.
This instead of hard coding them in javascript. We will need the forms as ruby/erb templates anyways so no need to keep them two places.
Diffstat (limited to 'registration.rb')
-rw-r--r--registration.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/registration.rb b/registration.rb
index a62bc2b..e8ddd6f 100644
--- a/registration.rb
+++ b/registration.rb
@@ -14,6 +14,14 @@ class RegistrationApp < Sinatra::Base
erb :index
end
+ get '/member/new/:num' do
+ erb :member, :layout => false, :locals => { :member_number => params['num'] }
+ end
+
+ get '/song/new/:num' do
+ erb :song, :layout => false, :locals => { :song_number => params['num'] }
+ end
+
post '/submit' do
if request.form_data?
#p request['band']