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.

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