diff --git a/src/web/survey.py b/src/web/survey.py index f518e13..6179e15 100755 --- a/src/web/survey.py +++ b/src/web/survey.py @@ -27,7 +27,13 @@ class About: class Thanks: def POST(self): - return render.thanks() + web_input = web.input() + user_id = web_input['user_id'].encode('utf8') + with open("./submissions/%s/ident" % user_id,'w') as ident: + for key in ["name","email","country","public","comments"]: + if web_input.has_key(key): + ident.write("%s: %s\n" % (key,web_input[key])) + return render.thanks_id() class Package: def GET(self, pkg): @@ -143,7 +149,7 @@ class Save: if web_input.has_key('strategy_button'): return Survey().POST() elif web_input.has_key('finish_button'): - return render.thanks() + return render.thanks(user_id) else: return render.survey_index() @@ -210,6 +216,7 @@ urls = ('/', 'Index', '/apprec', 'Survey', '/thanks', 'Thanks', '/save', 'Save', + '/thanks', 'Thanks', '/about', 'About', '/package/(.*)', 'Package' ) diff --git a/src/web/templates/thanks.html b/src/web/templates/thanks.html index a601d8e..27ef05f 100644 --- a/src/web/templates/thanks.html +++ b/src/web/templates/thanks.html @@ -1,4 +1,5 @@ -$var title: Feedback +$def with (user_id) +$var title: Thanks $var mod = 'thanks'; $var cssfiles: static/css/survey.css @@ -7,9 +8,10 @@ $var cssfiles: static/css/survey.css

Identification

-
+

@@ -311,7 +313,7 @@ $var cssfiles: static/css/survey.css address you'll be sent the survey results report as soon as it is released. If you have any further comments, please send it through the form below.


- +
-- libgit2 0.21.2