Consolidated profile and settings tab onto a single page

This commit is contained in:
Sahat Yalkabov
2014-01-07 14:23:29 -05:00
parent 5d5d546d25
commit ae2b31c1fe

View File

@ -3,31 +3,24 @@ extends ../layout
block content block content
if error.length if error.length
.alert.alert-danger.fade.in .alert.alert-danger.fade.in
button.close(data-dismiss='alert'): i.fa.fa-times-circle button.close(data-dixsiss='alert'): i.fa.fa-times-circle
= error = error
if success.length if success.length
.alert.alert-success.fade.in .alert.alert-success.fade.in
button.close(data-dismiss='alert'): i.fa.fa-times-circle button.close(data-dixsiss='alert'): i.fa.fa-times-circle
= success = success
ul.nav.nav-tabs#myTab .page-header
li.active
a(href='#profile', data-toggle='tab') Profile
li
a(href='#settings', data-toggle='tab') Settings
.tab-content
#profile.tab-pane.fade.active.in
.pahe-header
h3 Profile Information h3 Profile Information
form.form-horizontal(action='/account/profile', method='POST') form.form-horizontal(action='/account/profile', method='POST')
.form-group .form-group
label.col-sm-2.control-label(for='name') Name label.col-xs-2.control-label(for='name') Name
.col-sm-4 .col-xs-4
input.form-control(type='text', name='name', id='name', value='#{user.profile.name}') input.form-control(type='text', name='name', id='name', value='#{user.profile.name}')
.form-group .form-group
label.col-sm-2.control-label(for='name') Gender label.col-xs-2.control-label(for='name') Gender
.col-sm-4 .col-xs-4
label.radio label.radio
input(type='radio', checked=user.profile.gender=='male', name='gender', value='male', data-toggle='radio') input(type='radio', checked=user.profile.gender=='male', name='gender', value='male', data-toggle='radio')
| Male | Male
@ -36,36 +29,35 @@ block content
| Female | Female
.form-group .form-group
// TODO: differentiate between username as email // TODO: differentiate between username as email
label.col-sm-2.control-label(for='email') Email label.col-xs-2.control-label(for='email') Email
.col-sm-4 .col-xs-4
input.form-control(type='email', name='email', id='email', value='#{user.profile.email}') input.form-control(type='email', name='email', id='email', value='#{user.profile.email}')
.form-group .form-group
label.col-sm-2.control-label(for='location') Location label.col-xs-2.control-label(for='location') Location
.col-sm-4 .col-xs-4
input.form-control(type='text', name='location', id='location', value='#{user.profile.location}') input.form-control(type='text', name='location', id='location', value='#{user.profile.location}')
.form-group .form-group
label.col-sm-2.control-label(for='website') Website label.col-xs-2.control-label(for='website') Website
.col-sm-4 .col-xs-4
input.form-control(type='text', name='website', id='website', value='#{user.profile.website}') input.form-control(type='text', name='website', id='website', value='#{user.profile.website}')
.form-group .form-group
.col-sm-offset-2.col-sm-4 .col-xs-offset-2.col-xs-4
button.btn.btn.btn-primary(type='submit') Update Profile button.btn.btn.btn-primary(type='submit') Update Profile
#settings.tab-pane.fade
.page-header .page-header
h3 Change Password h3 Change Password
form.form-horizontal(action='/account/settings', method='POST') form.form-horizontal(action='/account/settings', method='POST')
.form-group .form-group
label.col-sm-3.control-label(for='password') Password label.col-xs-3.control-label(for='password') Password
.col-sm-4 .col-xs-4
input.form-control(type='password', name='password', id='password') input.form-control(type='password', name='password', id='password')
.form-group .form-group
label.col-sm-3.control-label(for='confirmPassword') Confirm Password label.col-xs-3.control-label(for='confirmPassword') Confirm Password
.col-sm-4 .col-xs-4
input.form-control(type='password', name='confirmPassword', id='confirmPassword') input.form-control(type='password', name='confirmPassword', id='confirmPassword')
.form-group .form-group
.col-sm-offset-3.col-sm-4 .col-xs-offset-3.col-xs-4
button.btn.btn.btn-primary(type='submit') Change Password button.btn.btn.btn-primary(type='submit') Change Password
.page-header .page-header