index.jade 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. div.content
  2. div.container1
  3. h1 User Profile
  4. form#profile( action = '/profile', method = 'POST' )
  5. h2 Account Information
  6. div.area
  7. div.row
  8. div.label
  9. span Email
  10. div.field
  11. span #{ user.email }
  12. div.row
  13. div.label
  14. label( for = 'affiliation' ) Affiliation
  15. div.field
  16. - if ( user.affil != 'Instructor' )
  17. select( id = 'affiliation', name = 'affiliation' )
  18. - if ( user.affil == 'Student' )
  19. option( value = 'Student', selected = true ) Student
  20. - else
  21. option( value = 'Student' ) Student
  22. - if ( user.affil == 'Teachers Assistant' )
  23. option( value = 'Teachers Assistant', selected = true ) Teachers Assistant
  24. - else
  25. option( value = 'Teachers Assistant' ) Teachers Assistant
  26. - else
  27. span #{ user.affil }
  28. h2 Profile Information
  29. div.area
  30. div.row
  31. div.label
  32. label( for = 'name' ) User Name
  33. div.field
  34. input( id = 'name', type = 'text', name = 'name', value = user.name )
  35. div.row
  36. div.label
  37. label  
  38. div.field
  39. - if ( user.showName )
  40. input( style = 'width: auto;', id = 'showName', type = 'checkbox', name = 'showName' , checked )
  41. - else
  42. input( style = 'width: auto;', id = 'showName', type = 'checkbox', name = 'showName' )
  43. | Display your real name in contributions
  44. - if ( user.affil != 'Instructor' )
  45. div.row
  46. div.label
  47. label( for = 'major' ) Major
  48. div.field
  49. input( id = 'major', type = 'text', name = 'major', value = user.major )
  50. div.row
  51. div.label
  52. label( for = 'bio' ) Bio
  53. div.field
  54. input( id = 'bio', type = 'text', name = 'bio', value = user.bio )
  55. h2 Change Password
  56. div.area
  57. - if ( user.hashed )
  58. div.row
  59. div.label
  60. label( for = 'existingPassword' ) Old Password
  61. div.field
  62. input( id = 'existingPassword', type = 'password', name = 'existingPassword' )
  63. div.row
  64. div.label
  65. label( for = 'newPassword' ) New Password
  66. div.field
  67. input( id = 'newPassword', type = 'password', name = 'newPassword' )
  68. div.row
  69. div.label
  70. label( for = 'newPasswordConfirm' ) Confirm Password
  71. div.field
  72. input( id = 'newPasswordConfirm', type = 'password', name = 'newPasswordConfirm' )
  73. div.row
  74. div.label
  75.  
  76. div.field
  77. button Submit