settings.jade 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. extends ../layout
  2. block content
  3. .content.content-alt
  4. .container
  5. .row
  6. .col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
  7. .card
  8. .page-header
  9. h1 Account Settings
  10. .account-settings(ng-controller="AccountSettingsController", ng-cloak)
  11. form-messages(for="settingsForm")
  12. .alert.alert-success(ng-show="settingsForm.response.success")
  13. | Thanks, your settings have been updated.
  14. form-messages(for="changePasswordForm")
  15. .container-fluid
  16. .row
  17. .col-md-5
  18. h3 Update Account Info
  19. form(async-form="settings", name="settingsForm", action="/user/settings", novalidate)
  20. input(type="hidden", name="_csrf", value=csrfToken)
  21. .form-group
  22. label(for='email') Email
  23. input.form-control(
  24. type='email',
  25. name='email',
  26. placeholder="email@example.com"
  27. required,
  28. ng-model="email",
  29. ng-init="email = #{JSON.stringify(user.email)}"
  30. )
  31. span.small.text-primary(ng-show="settingsForm.email.$invalid && settingsForm.email.$dirty")
  32. | Must be an email address
  33. .form-group
  34. label(for='firstName').control-label First Name
  35. input.form-control(
  36. type='text',
  37. name='first_name',
  38. value=user.first_name
  39. )
  40. .form-group
  41. label(for='lastName').control-label Last Name
  42. input.form-control(
  43. type='text',
  44. name='last_name',
  45. value=user.last_name
  46. )
  47. .actions
  48. button.btn.btn-primary(
  49. type='submit',
  50. ng-disabled="settingsForm.$invalid"
  51. ) Update
  52. .col-md-5.col-md-offset-1
  53. h3 Change Password
  54. form(async-form="changepassword", name="changePasswordForm", action="/user/password/update", novalidate)
  55. input(type="hidden", name="_csrf", value=csrfToken)
  56. .form-group
  57. label(for='currentPassword') Current Password
  58. input.form-control(
  59. type='password',
  60. name='currentPassword',
  61. placeholder='*********',
  62. ng-model="currentPassword",
  63. required
  64. )
  65. span.small.text-primary(ng-show="changePasswordForm.currentPassword.$invalid && changePasswordForm.currentPassword.$dirty")
  66. | Required
  67. .form-group
  68. label(for='newPassword1') New Password
  69. input.form-control(
  70. type='password',
  71. name='newPassword1',
  72. placeholder='*********',
  73. ng-model="newPassword1",
  74. required
  75. )
  76. span.small.text-primary(ng-show="changePasswordForm.newPassword1.$invalid && changePasswordForm.newPassword1.$dirty")
  77. | Required
  78. .form-group
  79. label(for='newPassword2') Confirm New Password
  80. input.form-control(
  81. type='password',
  82. name='newPassword2',
  83. placeholder='*********',
  84. ng-model="newPassword2",
  85. equals="{{newPassword1}}"
  86. )
  87. span.small.text-primary(ng-show="changePasswordForm.newPassword2.$invalid && changePasswordForm.newPassword2.$dirty")
  88. | Doesn't match
  89. .actions
  90. button.btn.btn-primary(
  91. type='submit',
  92. ng-disabled="changePasswordForm.$invalid"
  93. ) Change
  94. hr.soften
  95. h3 Dropbox Integration
  96. span.small
  97. a(href='/help/kb/dropbox-2') (Learn more)
  98. - if(!userHasDropboxFeature)
  99. .alert.alert-info Dropbox sync is a premium feature    
  100. a.btn.btn-info(href='/user/subscription/plans') Upgrade
  101. - else if(userIsRegisteredWithDropbox)
  102. .alert.alert-success Account is linked!
  103. row
  104. a(href='/dropbox/unlink').btn Unlink Dropbox
  105. - else
  106. a.btn.btn-info(href='/dropbox/beginAuth') Link to dropbox
  107. hr.soften
  108. p.small
  109. | Every few months we send a newsletter out summarizing the new features available.
  110. | If you would prefer not to receive this email then you can unsubscribe at any time:
  111. a(
  112. href,
  113. ng-click="unsubscribe()",
  114. ng-show="subscribed && !unsubscribing"
  115. ) Unsubscribe
  116. span(
  117. ng-show="unsubscribing"
  118. )
  119. i.fa.fa-spin.fa-refresh
  120. | Unsubscribing
  121. span.text-success(
  122. ng-show="!subscribed"
  123. )
  124. i.fa.fa-check
  125. | Unsubscribed
  126. p Need to leave?
  127. a(href, ng-click="deleteAccount()") Delete your account
  128. script(type='text/ng-template', id='deleteAccountModalTemplate')
  129. .modal-header
  130. h3 Delete Account
  131. .modal-body
  132. p
  133. | You are about to permanently <strong>delete all of your account data</strong>, including your projects
  134. | and settings. Please type DELETE into the box below to proceed.
  135. form(novalidate, name="deleteAccountForm")
  136. input.form-control(
  137. type="text",
  138. placeholder="",
  139. ng-model="deleteConfirmationText",
  140. equals="DELETE",
  141. focus-on="open"
  142. )
  143. .modal-footer
  144. button.btn.btn-default(
  145. ng-click="cancel()"
  146. ) Cancel
  147. button.btn.btn-danger(
  148. ng-disabled="deleteAccountForm.$invalid || state.inflight"
  149. ng-click="delete()"
  150. )
  151. span(ng-hide="state.inflight") Delete
  152. span(ng-show="state.inflight") Deleting...