Skip to content

Commit

Permalink
started on profile page
Browse files Browse the repository at this point in the history
  • Loading branch information
toantran committed Mar 30, 2012
1 parent 4f54957 commit 87df284
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
1 change: 1 addition & 0 deletions coffee/services/user.coffee
Expand Up @@ -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
Expand Down
31 changes: 29 additions & 2 deletions views/profile.jade
@@ -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.