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.

82 lines
2.8 KiB

9 years ago
  1. {% extends "base.html" %}
  2. {% load humanize static hc_extras %}
  3. {% block title %}Set Up Email Notifications - {% site_name %}{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <h1>Email</h1>
  8. <p>Get an email message when check goes up or down.</p>
  9. {% if use_verification %}
  10. <p class="alert alert-info">
  11. <strong>Requires confirmation.</strong>
  12. After entering an email address, {% site_name %} will send out a confirmation link.
  13. Only confirmed addresses receive notifications.
  14. </p>
  15. {% endif %}
  16. <h2>Integration Settings</h2>
  17. <form method="post" class="form-horizontal" action="{% url 'hc-add-email' %}">
  18. {% csrf_token %}
  19. <div class="form-group {{ form.value.css_classes }}">
  20. <label for="id_email" class="col-sm-2 control-label">Email</label>
  21. <div class="col-sm-3">
  22. <input
  23. id="id_email"
  24. type="email"
  25. class="form-control"
  26. name="value"
  27. placeholder="[email protected]"
  28. required
  29. value="{{ form.value.value|default:"" }}">
  30. {% if form.value.errors %}
  31. <div class="help-block">
  32. {{ form.value.errors|join:"" }}
  33. </div>
  34. {% endif %}
  35. </div>
  36. </div>
  37. <div id="add-email-notify-group" class="form-group">
  38. <label class="col-sm-2 control-label">Notify When</label>
  39. <div class="col-sm-10">
  40. <label class="checkbox-container">
  41. <input
  42. type="checkbox"
  43. name="down"
  44. value="true"
  45. {% if form.down.value %} checked {% endif %}>
  46. <span class="checkmark"></span>
  47. A check goes <strong>down</strong>
  48. </label>
  49. <label class="checkbox-container">
  50. <input
  51. type="checkbox"
  52. name="up"
  53. value="true"
  54. {% if form.up.value %} checked {% endif %}>
  55. <span class="checkmark"></span>
  56. A check goes <strong>up</strong>
  57. <br />
  58. <span class="text-muted">
  59. Ticketing system integrations: untick this and avoid creating new tickets
  60. when checks come back up.
  61. </span>
  62. </label>
  63. </div>
  64. </div>
  65. <div class="form-group">
  66. <div class="col-sm-offset-2 col-sm-10">
  67. <button type="submit" class="btn btn-primary">Save Integration</button>
  68. </div>
  69. </div>
  70. </form>
  71. </div>
  72. </div>
  73. {% endblock %}