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.

98 lines
3.3 KiB

  1. {% extends "base.html" %}
  2. {% load humanize static hc_extras %}
  3. {% block title %}Add Signal Integration - {{ site_name }}{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <h1>Signal</h1>
  8. <p>Get a Signal message when a check goes up or down.</p>
  9. <h2>Integration Settings</h2>
  10. <form method="post" class="form-horizontal">
  11. {% csrf_token %}
  12. <div class="form-group {{ form.label.css_classes }}">
  13. <label for="id_label" class="col-sm-2 control-label">Label</label>
  14. <div class="col-sm-6">
  15. <input
  16. id="id_label"
  17. type="text"
  18. class="form-control"
  19. name="label"
  20. placeholder="Alice's Phone"
  21. value="{{ form.label.value|default:"" }}">
  22. {% if form.label.errors %}
  23. <div class="help-block">
  24. {{ form.label.errors|join:"" }}
  25. </div>
  26. {% else %}
  27. <span class="help-block">
  28. Optional. If you add multiple phone numbers,
  29. the labels will help you tell them apart.
  30. </span>
  31. {% endif %}
  32. </div>
  33. </div>
  34. <div class="form-group {{ form.phone.css_classes }}">
  35. <label for="id_number" class="col-sm-2 control-label">Phone Number</label>
  36. <div class="col-sm-3">
  37. <input
  38. id="id_number"
  39. type="tel"
  40. class="form-control"
  41. name="phone"
  42. placeholder="+1234567890"
  43. value="{{ form.phone.value|default:"" }}">
  44. {% if form.phone.errors %}
  45. <div class="help-block">
  46. {{ form.phone.errors|join:"" }}
  47. </div>
  48. {% else %}
  49. <span class="help-block">
  50. Make sure the phone number starts with "+" and has the
  51. country code.
  52. </span>
  53. {% endif %}
  54. </div>
  55. </div>
  56. <div id="add-email-notify-group" class="form-group">
  57. <label class="col-sm-2 control-label">Notify When</label>
  58. <div class="col-sm-10">
  59. <label class="checkbox-container">
  60. <input
  61. type="checkbox"
  62. name="down"
  63. value="true"
  64. {% if form.down.value %} checked {% endif %}>
  65. <span class="checkmark"></span>
  66. A check goes <strong>down</strong>
  67. </label>
  68. <label class="checkbox-container">
  69. <input
  70. type="checkbox"
  71. name="up"
  72. value="true"
  73. {% if form.up.value %} checked {% endif %}>
  74. <span class="checkmark"></span>
  75. A check goes <strong>up</strong>
  76. </label>
  77. </div>
  78. </div>
  79. <div class="form-group">
  80. <div class="col-sm-offset-2 col-sm-10">
  81. <button type="submit" class="btn btn-primary">Save Integration</button>
  82. </div>
  83. </div>
  84. </form>
  85. </div>
  86. </div>
  87. {% endblock %}