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.

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