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.

94 lines
3.1 KiB

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