2013-11-19 18:20:50 +00:00
|
|
|
|
extends layout
|
2013-11-20 13:03:10 +00:00
|
|
|
|
|
2013-11-19 18:20:50 +00:00
|
|
|
|
block content
|
2013-12-15 19:11:57 +00:00
|
|
|
|
if error.length
|
2013-12-18 08:08:52 +00:00
|
|
|
|
.alert.alert-danger.fade.in
|
|
|
|
|
button.close(type='button', data-dismiss='alert', aria-hidden='true') ×
|
|
|
|
|
= error
|
2013-12-15 19:11:57 +00:00
|
|
|
|
if success.length
|
2013-12-18 08:08:52 +00:00
|
|
|
|
.alert.alert-success.fade.in
|
|
|
|
|
button.close(type='button', data-dismiss='alert', aria-hidden='true') ×
|
|
|
|
|
= success
|
2013-12-13 02:47:34 +00:00
|
|
|
|
|
2013-12-13 05:30:37 +00:00
|
|
|
|
ul.nav.nav-tabs#myTab
|
2013-12-05 21:42:30 +00:00
|
|
|
|
li.active
|
2013-12-15 19:02:41 +00:00
|
|
|
|
a(href='#profile', data-toggle='tab') Profile
|
2013-12-05 21:42:30 +00:00
|
|
|
|
li
|
|
|
|
|
a(href='#settings', data-toggle='tab') Settings
|
|
|
|
|
.tab-content
|
|
|
|
|
#basic.tab-pane.fade.active.in
|
2013-12-12 18:55:12 +00:00
|
|
|
|
.pahe-header
|
|
|
|
|
h3 Profile Information
|
2013-12-12 19:01:19 +00:00
|
|
|
|
|
2013-12-06 04:53:14 +00:00
|
|
|
|
form.form-horizontal(action='/account/profile', method='POST')
|
2013-12-05 21:42:30 +00:00
|
|
|
|
.form-group
|
|
|
|
|
label.col-sm-2.control-label(for='name') Name
|
|
|
|
|
.col-sm-4
|
2013-12-06 04:53:14 +00:00
|
|
|
|
input.form-control(type='text', name='name', id='name', value='#{user.profile.name}')
|
2013-12-06 05:18:39 +00:00
|
|
|
|
.form-group
|
|
|
|
|
label.col-sm-2.control-label(for='name') Gender
|
|
|
|
|
.col-sm-4
|
2013-12-18 08:06:41 +00:00
|
|
|
|
label.radio
|
|
|
|
|
input(type='radio', checked=user.profile.gender=='male', name='gender', value='male', data-toggle='radio')
|
|
|
|
|
| Male
|
|
|
|
|
label.radio
|
|
|
|
|
input(type='radio', checked=user.profile.gender=='female', name='gender', value='female', data-toggle='radio')
|
|
|
|
|
| Female
|
2013-12-05 21:42:30 +00:00
|
|
|
|
.form-group
|
2013-12-14 22:39:37 +00:00
|
|
|
|
// TODO: differentiate between username as email
|
2013-12-05 21:42:30 +00:00
|
|
|
|
label.col-sm-2.control-label(for='email') Email
|
|
|
|
|
.col-sm-4
|
2013-12-06 04:53:14 +00:00
|
|
|
|
input.form-control(type='email', name='email', id='email', value='#{user.profile.email}')
|
2013-12-05 21:42:30 +00:00
|
|
|
|
.form-group
|
|
|
|
|
label.col-sm-2.control-label(for='location') Location
|
|
|
|
|
.col-sm-4
|
2013-12-06 04:53:14 +00:00
|
|
|
|
input.form-control(type='text', name='location', id='location', value='#{user.profile.location}')
|
2013-12-05 21:42:30 +00:00
|
|
|
|
.form-group
|
|
|
|
|
label.col-sm-2.control-label(for='website') Website
|
|
|
|
|
.col-sm-4
|
2013-12-06 04:53:14 +00:00
|
|
|
|
input.form-control(type='text', name='website', id='website', value='#{user.profile.website}')
|
2013-12-05 21:42:30 +00:00
|
|
|
|
.form-group
|
2013-12-07 21:06:36 +00:00
|
|
|
|
.col-sm-offset-2.col-sm-4
|
|
|
|
|
button.btn.btn.btn-primary(type='submit') Update Profile
|
2013-12-05 21:42:30 +00:00
|
|
|
|
|
|
|
|
|
#settings.tab-pane.fade
|
2013-12-12 18:55:12 +00:00
|
|
|
|
.page-header
|
|
|
|
|
h3 Change Password
|
2013-12-12 19:01:19 +00:00
|
|
|
|
|
2013-12-13 02:47:34 +00:00
|
|
|
|
form.form-horizontal(action='/account/settings', method='POST')
|
2013-12-07 20:14:28 +00:00
|
|
|
|
.form-group
|
|
|
|
|
label.col-sm-3.control-label(for='password') Password
|
|
|
|
|
.col-sm-4
|
|
|
|
|
input.form-control(type='password', name='password', id='password')
|
|
|
|
|
.form-group
|
|
|
|
|
label.col-sm-3.control-label(for='confirmPassword') Confirm Password
|
|
|
|
|
.col-sm-4
|
2013-12-13 02:47:34 +00:00
|
|
|
|
input.form-control(type='password', name='confirmPassword', id='confirmPassword')
|
2013-12-07 20:14:28 +00:00
|
|
|
|
.form-group
|
|
|
|
|
.col-sm-offset-3.col-sm-4
|
2013-12-12 18:55:12 +00:00
|
|
|
|
button.btn.btn.btn-primary(type='submit') Change Password
|
2013-12-12 19:01:19 +00:00
|
|
|
|
|
2013-12-07 20:21:08 +00:00
|
|
|
|
.page-header
|
|
|
|
|
h3 Delete Account
|
2013-12-12 19:01:19 +00:00
|
|
|
|
|
2013-12-12 18:55:12 +00:00
|
|
|
|
p You can delete your account, but keep in mind this action is irreversiable.
|
|
|
|
|
form(action='/account/delete', method='POST')
|
|
|
|
|
button.btn.btn-danger(type='submit') Delete my account
|
2013-12-05 21:42:30 +00:00
|
|
|
|
|
2013-12-07 21:06:36 +00:00
|
|
|
|
.page-header
|
|
|
|
|
h3 Linked Accounts
|
2013-12-12 19:01:19 +00:00
|
|
|
|
|
|
|
|
|
if user.google
|
2013-12-13 06:12:59 +00:00
|
|
|
|
p: a.text-danger(href='/account/unlink/google') Unlink your Google account
|
2013-12-12 19:01:19 +00:00
|
|
|
|
else
|
2013-12-13 05:30:37 +00:00
|
|
|
|
p: a(href='/auth/google') Link your Google account
|
2013-12-12 19:01:19 +00:00
|
|
|
|
|
|
|
|
|
if user.facebook
|
2013-12-13 06:12:59 +00:00
|
|
|
|
p: a.text-danger(href='/account/unlink/') Unlink your Facebook account
|
2013-12-12 19:01:19 +00:00
|
|
|
|
else
|
2013-12-13 05:30:37 +00:00
|
|
|
|
p: a(href='/auth/facebook') Link your Facebook account
|
2013-12-12 19:01:19 +00:00
|
|
|
|
|
|
|
|
|
if user.twitter
|
2013-12-13 06:12:59 +00:00
|
|
|
|
p: a.text-danger(href='/account/unlink/') Unlink your Twitter account
|
2013-12-12 19:01:19 +00:00
|
|
|
|
else
|
2013-12-13 05:30:37 +00:00
|
|
|
|
p: a(href='/auth/twitter') Link your Twitter account
|
2013-12-12 19:01:19 +00:00
|
|
|
|
|
|
|
|
|
if user.github
|
2013-12-13 06:12:59 +00:00
|
|
|
|
p: a.text-danger(href='/account/unlink/') Unlink your GitHub account
|
2013-12-12 19:01:19 +00:00
|
|
|
|
else
|
2013-12-13 05:30:37 +00:00
|
|
|
|
p: a(href='/auth/github') Link your GitHub account
|