profile.jade 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. extends ../layout
  2. block content
  3. section#partial
  4. .container
  5. .row
  6. .col-sm-8.col-sm-offset-2.text-center
  7. h3 Profile
  8. hr
  9. .row
  10. form.form-horizontal(action='/account/profile', method='POST')
  11. input(type='hidden', name='_csrf', value=_csrf)
  12. .form-group
  13. label.col-sm-3.control-label(for='email') Email
  14. .col-sm-7
  15. input.form-control(type='email', name='email', id='email', value='#{user.email}')
  16. .form-group
  17. label.col-sm-3.control-label(for='name') Name
  18. .col-sm-7
  19. input.form-control(type='text', name='name', id='name', value='#{user.profile.name}')
  20. .form-group
  21. label.col-sm-3.control-label(for='gender') Gender
  22. .col-sm-4
  23. label.radio.col-sm-4
  24. input(type='radio', checked=user.profile.gender=='male', name='gender', value='male', data-toggle='radio')
  25. span Male
  26. label.radio.col-sm-4
  27. input(type='radio', checked=user.profile.gender=='female', name='gender', value='female', data-toggle='radio')
  28. span Female
  29. .form-group
  30. label.col-sm-3.control-label(for='location') Location
  31. .col-sm-7
  32. input.form-control(type='text', name='location', id='location', value='#{user.profile.location}')
  33. .form-group
  34. label.col-sm-3.control-label(for='website') Website
  35. .col-sm-7
  36. input.form-control(type='text', name='website', id='website', value='#{user.profile.website}')
  37. .form-group
  38. label.col-sm-3.control-label(for='gravatar') Gravatar
  39. .col-sm-4
  40. img(src="#{user.gravatar()}", class='profile', width='100', height='100')
  41. .form-group
  42. .col-sm-offset-3.col-sm-4
  43. button.btn.btn.btn-primary(type='submit')
  44. i.fa.fa-pencilr
  45. | Update Profile
  46. .page-header
  47. h3 Change Password
  48. form.form-horizontal(action='/account/password', method='POST')
  49. input(type='hidden', name='_csrf', value=_csrf)
  50. .form-group
  51. label.col-sm-3.control-label(for='password') New Password
  52. .col-sm-7
  53. input.form-control(type='password', name='password', id='password')
  54. .form-group
  55. label.col-sm-3.control-label(for='confirmPassword') Confirm Password
  56. .col-sm-7
  57. input.form-control(type='password', name='confirmPassword', id='confirmPassword')
  58. .form-group
  59. .col-sm-offset-3.col-sm-4
  60. button.btn.btn-primary(type='submit')
  61. i.fa.fa-lock
  62. | Change Password
  63. .page-header
  64. h3 Delete Account
  65. form.form-horizontal(action='/account/delete', method='POST')
  66. .form-group
  67. p.col-sm-offset-3.col-sm-4 You can delete your account, but keep in mind this action is irreversible.
  68. input(type='hidden', name='_csrf', value=_csrf)
  69. .col-sm-offset-3.col-sm-4
  70. button.btn.btn-danger(type='submit')
  71. i.fa.fa-trash
  72. | Delete my account
  73. .page-header
  74. h3 Linked Accounts
  75. .form-horizontal
  76. .form-group
  77. .col-sm-offset-3.col-sm-4
  78. if user.instagram
  79. p: a.text-danger(href='/account/unlink/instagram') Unlink your Instagram account
  80. else
  81. p: a(href='/auth/instagram') Link your Instagram account
  82. .col-sm-offset-3.col-sm-4
  83. if user.google
  84. p: a.text-danger(href='/account/unlink/google') Unlink your Google account
  85. else
  86. p: a(href='/auth/google') Link your Google account
  87. .col-sm-offset-3.col-sm-4
  88. if user.facebook
  89. p: a.text-danger(href='/account/unlink/facebook') Unlink your Facebook account
  90. else
  91. p: a(href='/auth/facebook') Link your Facebook account
  92. .col-sm-offset-3.col-sm-4
  93. if user.twitter
  94. p: a.text-danger(href='/account/unlink/twitter') Unlink your Twitter account
  95. else
  96. p: a(href='/auth/twitter') Link your Twitter account
  97. .col-sm-offset-3.col-sm-4
  98. if user.github
  99. p: a.text-danger(href='/account/unlink/github') Unlink your GitHub account
  100. else
  101. p: a(href='/auth/github') Link your GitHub account
  102. .col-sm-offset-3.col-sm-4
  103. if user.linkedin
  104. p: a.text-danger(href='/account/unlink/linkedin') Unlink your LinkedIn account
  105. else
  106. p: a(href='/auth/linkedin') Link your LinkedIn account