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.

129 lines
5.0 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. {% extends "base.html" %}
  2. {% load compress hc_extras static tz %}
  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">
  8. Settings
  9. <small>{{ request.user.email }}</small>
  10. </h1>
  11. </div>
  12. </div>
  13. <div class="row">
  14. <div class="col-sm-3">
  15. <ul class="nav nav-pills nav-stacked">
  16. <li><a href="{% url 'hc-profile' %}">Account</a></li>
  17. <li><a href="{% url 'hc-appearance' %}">Appearance</a></li>
  18. {% if show_pricing %}
  19. <li><a href="{% url 'hc-billing' %}">Billing</a></li>
  20. {% endif %}
  21. <li class="active"><a href="{% url 'hc-notifications' %}">Email Reports</a></li>
  22. </ul>
  23. </div>
  24. <div class="col-sm-9 col-md-6">
  25. <div class="panel panel-{{ status }}">
  26. <div class="panel-body settings-block">
  27. <form method="post">
  28. {% csrf_token %}
  29. <h2>Email Reports</h2>
  30. <input id="tz" type="hidden" name="tz" value="{{ profile.tz }}" />
  31. <p>Periodic email reports:</p>
  32. <label class="radio-container">
  33. <input
  34. type="radio"
  35. name="reports"
  36. value="off"
  37. {% if profile.reports == "off" %} checked {% endif %}>
  38. <span class="radiomark"></span>
  39. Off
  40. </label>
  41. <label class="radio-container">
  42. <input
  43. type="radio"
  44. name="reports"
  45. value="weekly"
  46. {% if profile.reports == "weekly" %} checked {% endif %}>
  47. <span class="radiomark"></span>
  48. <strong>Weekly</strong> on Mondays
  49. </label>
  50. <label class="radio-container">
  51. <input
  52. type="radio"
  53. name="reports"
  54. value="monthly"
  55. {% if profile.reports == "monthly" %} checked {% endif %}>
  56. <span class="radiomark"></span>
  57. <strong>Monthly</strong> on 1st of every month
  58. </label>
  59. <br>
  60. <p>Ongoing reminders if any checks are down:</p>
  61. <label class="radio-container">
  62. <input
  63. type="radio"
  64. name="nag_period"
  65. value="0"
  66. {% if profile.nag_period.total_seconds == 0 %} checked {% endif %}>
  67. <span class="radiomark"></span>
  68. Do not remind me
  69. </label>
  70. <label class="radio-container">
  71. <input
  72. type="radio"
  73. name="nag_period"
  74. value="86400"
  75. {% if profile.nag_period.total_seconds == 86400 %} checked {% endif %}>
  76. <span class="radiomark"></span>
  77. Remind me <strong>daily</strong>
  78. </label>
  79. <label class="radio-container">
  80. <input
  81. type="radio"
  82. name="nag_period"
  83. value="3600"
  84. {% if profile.nag_period.total_seconds == 3600 %} checked {% endif %}>
  85. <span class="radiomark"></span>
  86. Remind me <strong>hourly</strong>
  87. </label>
  88. <br />
  89. <p class="text-muted">
  90. Reports will be delivered to {{ profile.user.email }}. <br />
  91. {% if profile.next_report_date %}
  92. {% timezone profile.tz %}
  93. Next {{ profile.reports }} report date is
  94. {{ profile.next_report_date|date:"F j, Y" }}.
  95. {% endtimezone %}
  96. {% endif %}
  97. </p>
  98. <br />
  99. <button
  100. type="submit"
  101. class="btn btn-default pull-right">Save Changes</button>
  102. </form>
  103. </div>
  104. {% if status == "info" %}
  105. <div class="panel-footer">
  106. Your settings have been updated!
  107. </div>
  108. {% endif %}
  109. </div>
  110. </div>
  111. </div>
  112. {% endblock %}
  113. {% block scripts %}
  114. {% compress js %}
  115. <script src="{% static 'js/jquery-3.6.0.min.js' %}"></script>
  116. <script src="{% static 'js/bootstrap.min.js' %}"></script>
  117. <script src="{% static 'js/notifications.js' %}"></script>
  118. {% endcompress %}
  119. {% endblock %}