From: Marius Gavrilescu Date: Thu, 29 Jan 2015 17:20:50 +0000 (+0200) Subject: Add country to users X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=ca0c7ea2c90553352245a398f62fcb25c3294c3f;p=gruntmaster-page.git Add country to users --- diff --git a/a/account.en b/a/account.en index 931e084..cd5eaef 100644 --- a/a/account.en +++ b/a/account.en @@ -7,6 +7,255 @@
+
diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 7f9c21f..59e5720 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -199,13 +199,13 @@ sub dispatch_request{ }, sub (POST) { - sub (/action/register + %:username=&:password=&:confirm_password=&:name=&:email=&:phone=&:town=&:university=&:level=) { + sub (/action/register + %:username=&:password=&:confirm_password=&:name=&:email=&:phone=&:town=&:university=&:country=&:level=) { return reply 'Parameter too long' if grep { length > 200 } values %_; return reply 'Bad username. Allowed characters are letters, digits and underscores, and the username must be between 2 and 20 characters long.' unless $_{username} =~ USER_REGEX; return reply 'Username already in use' if db->user($_{username}); return reply 'The two passwords do not match' unless $_{password} eq $_{confirm_password}; - db->users->create({id => $_{username}, name => $_{name}, email => $_{email}, phone => $_{phone}, town => $_{town}, university => $_{university}, level => $_{level}}); + db->users->create({id => $_{username}, name => $_{name}, email => $_{email}, phone => $_{phone}, town => $_{town}, university => $_{university}, country => $_{country}, level => $_{level}}); db->user($_{username})->set_passphrase($_{password}); purge '/us/'; diff --git a/tmpl/us_entry.en b/tmpl/us_entry.en index 65fb98f..3d56654 100644 --- a/tmpl/us_entry.en +++ b/tmpl/us_entry.en @@ -1,6 +1,7 @@
Town
Town
University
University
+
Nationality
Romanian
Level
Level