auto-populate account page form fields with existing data

This commit is contained in:
Sahat Yalkabov
2013-11-19 13:23:39 -05:00
parent 4b1ee53d1e
commit 3c6b5b9ee0

View File

@ -6,13 +6,13 @@ block content
.row
.col-xs-6.col-sm-6.col-md-6
label(for='firstName') First Name
input.form-control(type='text', name='firstName', id='firstName', placeholder='First Name', autofocus='')
input.form-control(type='text', name='firstName', id='firstName', value='#{user.firstName}')
.col-xs-6.col-sm-6.col-md-6
label(for='lastName') Last Name
input.form-control(type='text', name='lastName', id='lastName', placeholder='Last Name')
input.form-control(type='text', name='lastName', id='lastName', value='#{user.lastName}')
.form-group
label(for='email') Email
input.form-control(type='email', name='email', id='email', placeholder='Email')
input.form-control(type='email', name='email', id='email', value='#{user.email}')
.form-group
label(for='password') Password
input.form-control(type='password', name='password', id='password', placeholder='Password')
@ -20,7 +20,7 @@ block content
label(for='confirmPassword') Confirm Password
input.form-control(type='password', id='confirmPassword', placeholder='Confirm Password')
.form-group
button.btn.btn.btn-primary(type='submit') Update
button.btn.btn.btn-info(type='submit') Update
if messages.length
.alert.alert-danger
for message in messages