From 65d49a3515071f9aece7cc3b1a7d502ce44dfe62 Mon Sep 17 00:00:00 2001 From: metoro Date: Sun, 29 Sep 2013 17:17:24 -0700 Subject: Add necessary fields for full company registration --- routes/users.coffee | 18 +++- views/users/new.html | 284 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 299 insertions(+), 3 deletions(-) diff --git a/routes/users.coffee b/routes/users.coffee index b39fc8e9..f34c3fd6 100644 --- a/routes/users.coffee +++ b/routes/users.coffee @@ -36,7 +36,23 @@ module.exports = (sessions) -> bcrypt.hash(req.body.password, 12, (err, hash) -> db.hmset( req.body.username, - {username: req.body.username, password: hash}, + { + username: req.body.username, + password: hash, + email: req.body.email, + firstname: req.body.firstname, + lastname: req.body.lastname, + company: req.body.company, + email: req.body.email, + companytype: req.body.companytype, + address1: req.body.address1, + address2: req.body.address2, + city: req.body.city, + postcode: req.body.postcode, + state: req.body.state, + country: req.body.country + } + , -> req.headers['referer'] = "/#{req.body.username}/edit" sessions.create(req, res) diff --git a/views/users/new.html b/views/users/new.html index 844b06c4..04ebb9d0 100644 --- a/views/users/new.html +++ b/views/users/new.html @@ -19,9 +19,289 @@ -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- + -- cgit v1.2.3