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.

88 lines
3.0 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">
  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 {{ form.down.css_classes }}">
  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. </span>
  58. {% if form.down.errors %}
  59. <div class="help-block">
  60. {{ form.down.errors|join:"" }}
  61. </div>
  62. {% else %}
  63. <br />
  64. <span class="text-muted">
  65. Ticketing system integrations: untick this and avoid creating new tickets
  66. when checks come back up.
  67. {% endif %}
  68. </label>
  69. </div>
  70. </div>
  71. <div class="form-group">
  72. <div class="col-sm-offset-2 col-sm-10">
  73. <button type="submit" class="btn btn-primary">Save Integration</button>
  74. </div>
  75. </div>
  76. </form>
  77. </div>
  78. </div>
  79. {% endblock %}