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.

109 lines
3.6 KiB

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