From 3c6b5b9ee0517253f8f1897faa9475b586ff41d9 Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Tue, 19 Nov 2013 13:23:39 -0500 Subject: [PATCH] auto-populate account page form fields with existing data --- views/account.jade | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/views/account.jade b/views/account.jade index e2d62a365a..4e299fe744 100644 --- a/views/account.jade +++ b/views/account.jade @@ -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