settings.jade 5.5 KB

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