Permalink
Browse files

started on profile page

  • Loading branch information...
1 parent 4f54957 commit 87df284d6c7e15e60d52feea6a0bb1c091993575 @toantran committed Mar 30, 2012
Showing with 30 additions and 2 deletions.
  1. +1 −0 coffee/services/user.coffee
  2. +29 −2 views/profile.jade
@@ -138,6 +138,7 @@ exports.insert = (user, callback = ->) ->
else
user.createdat = new Date()
user.password = hash user.password, 'a little dog'
+ delete user.passwordconfirm
user.dataschema ?= name: 1, contact: 1, address: 1
try
newUserRepo.create user, cb
View
@@ -1,2 +1,29 @@
-h1= title
-p Welcome to #{title}
+.row
+ .span4.offset4
+ .row
+ .span4
+ form(method='POST')
+ fieldset
+ legend PROFILE
+ .space1
+ label(for='form-signup-nickname') Company Name
+ input#form-signup-nickname(maxlength='255', name='companyname', size='25', type='text', value=nickname, placeholder='Enter your company name')= user.nickname
+ label(for='form-login-username') Email address
+ input#form-login-username(maxlength='255', name='username', size='25', type='text', required, placeholder='Enter your email address')= user.username
+ label Company Address (optional)
+ textarea(name='address', placeholder='Enter your company address')= user.address
+ .message!= partial('messages')
+ button.btn.btn-primary(type='submit') Save
+ .row
+ .span4
+ form(method='POST', action='/changepassword')
+ fieldset
+ legend Change password
+ .space1
+ label(for='form-login-password') Password
+ input#form-login-password(maxlength='16', name='password', size='25', type='password', required, placeholder='Enter your password')
+ label(for='form-login-password-confirm') Confirm Password
+ input#form-login-password-confirm(maxlength='16', name='passwordconfirm', size='25', type='password', required, placeholder='Re-enter your password')
+ .message!= partial('messages')
+ button.btn.btn-primary(type='submit') Save
+script(type='text/javascript', src='/js/signup.js')

0 comments on commit 87df284

Please sign in to comment.