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.

102 lines
3.7 KiB

  1. {% extends "base.html" %}
  2. {% load compress staticfiles hc_extras %}
  3. {% block title %}Account Settings - {% site_name %}{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <h1 class="settings-title">Settings</h1>
  8. </div>
  9. </div>
  10. <div class="row">
  11. <div class="col-sm-3">
  12. <ul class="nav nav-pills nav-stacked">
  13. <li><a href="{% url 'hc-profile' %}">Account</a></li>
  14. <li class="active"><a href="{% url 'hc-notifications' %}">Email Reports</a></li>
  15. <li><a href="{% url 'hc-badges' %}">Badges</a></li>
  16. </ul>
  17. </div>
  18. <div class="col-sm-9 col-md-6">
  19. <div class="panel panel-{{ status }}">
  20. <div class="panel-body settings-block">
  21. <form method="post">
  22. {% csrf_token %}
  23. <h2>Email Reports</h2>
  24. <p>Send me monthly emails about:</p>
  25. <label class="checkbox-container">
  26. <input
  27. name="reports_allowed"
  28. type="checkbox"
  29. {% if profile.reports_allowed %} checked {% endif %}>
  30. <span class="checkmark"></span>
  31. The status of checks in all teams I belong to
  32. </label>
  33. <br>
  34. <p>If any checks are down:</p>
  35. <label class="radio-container">
  36. <input
  37. type="radio"
  38. name="nag_period"
  39. value="0"
  40. {% if profile.nag_period.total_seconds == 0 %} checked {% endif %}>
  41. <span class="radiomark"></span>
  42. Do not remind me
  43. </label>
  44. <label class="radio-container">
  45. <input
  46. type="radio"
  47. name="nag_period"
  48. value="86400"
  49. {% if profile.nag_period.total_seconds == 86400 %} checked {% endif %}>
  50. <span class="radiomark"></span>
  51. Remind me daily
  52. </label>
  53. <label class="radio-container">
  54. <input
  55. type="radio"
  56. name="nag_period"
  57. value="3600"
  58. {% if profile.nag_period.total_seconds == 3600 %} checked {% endif %}>
  59. <span class="radiomark"></span>
  60. Remind me hourly
  61. </label>
  62. <br />
  63. <p style="color: #888">
  64. Reports will be delivered to {{ profile.user.email }}. <br />
  65. {% if profile.next_report_date %}
  66. Next monthly report date is
  67. {{ profile.next_report_date.date }}.
  68. {% endif %}
  69. </p>
  70. <br />
  71. <button
  72. name="update_reports_allowed"
  73. type="submit"
  74. class="btn btn-default pull-right">Save Changes</button>
  75. </form>
  76. </div>
  77. {% if status == "info" %}
  78. <div class="panel-footer">
  79. Your settings have been updated!
  80. </div>
  81. {% endif %}
  82. </div>
  83. </div>
  84. </div>
  85. {% endblock %}
  86. {% block scripts %}
  87. {% compress js %}
  88. <script src="{% static 'js/jquery-2.1.4.min.js' %}"></script>
  89. <script src="{% static 'js/bootstrap.min.js' %}"></script>
  90. {% endcompress %}
  91. {% endblock %}