You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.8 KiB

  1. {% extends "base.html" %}
  2. {% load hc_extras %}
  3. {% block content %}
  4. <div class="row">
  5. <div class="col-sm-6 col-sm-offset-3">
  6. <div class="hc-dialog">
  7. <h1>Change Account's Email Address</h1>
  8. <div class="dialog-body">
  9. <p>
  10. Your account's email address is used for sending
  11. the sign-in links and monthly reports.
  12. <strong>
  13. Make sure you can receive emails at the new address.
  14. </strong>
  15. Otherwise, you may get locked out of
  16. your {{ site_name }} account.
  17. </p>
  18. {% if request.user.has_usable_password %}
  19. <p class="alert alert-warning">
  20. <strong>Your password will be reset.</strong>
  21. For security purposes, after updating your email address,
  22. {% site_name %} will also reset your current password
  23. and log you out.
  24. </p>
  25. {% endif %}
  26. {% if request.user.credentials.exists %}
  27. <p class="alert alert-warning">
  28. <strong>Two-factor authentication is active.</strong>
  29. If you are handing this account over to somebody else,
  30. consider disabling two-factor authentication first.
  31. </p>
  32. {% endif %}
  33. </div>
  34. <form method="post">
  35. {% csrf_token %}
  36. <div class="form-group">
  37. <label class="control-label">Current Email</label>
  38. <input
  39. type="text"
  40. class="form-control input-lg"
  41. disabled
  42. value="{{ request.user.email }}">
  43. </div>
  44. <div class="form-group {{ form.email.css_classes }}">
  45. <label for="ce-email" class="control-label">New Email</label>
  46. <input
  47. type="email"
  48. class="form-control input-lg"
  49. id="ce-email"
  50. name="email"
  51. placeholder="[email protected]">
  52. {% if form.email.errors %}
  53. <div class="help-block">
  54. {{ form.email.errors|join:"" }}
  55. </div>
  56. {% endif %}
  57. </div>
  58. <div class="clearfix">
  59. <button type="submit" class="btn btn-lg btn-primary pull-right">
  60. Change Email
  61. </button>
  62. </div>
  63. </form>
  64. </div>
  65. </div>
  66. </div>
  67. {% endblock %}