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.

113 lines
4.0 KiB

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