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.

83 lines
2.8 KiB

  1. {% extends "base.html" %}
  2. {% load humanize static hc_extras %}
  3. {% block title %}Notification Channels - {% 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-success">
  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" action="{% url 'hc-add-sms' %}">
  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.value.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="value"
  53. placeholder="+1234567890"
  54. value="{{ form.value.value|default:"" }}">
  55. {% if form.value.errors %}
  56. <div class="help-block">
  57. {{ form.value.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 class="form-group">
  68. <div class="col-sm-offset-2 col-sm-10">
  69. <button type="submit" class="btn btn-primary">Save Integration</button>
  70. </div>
  71. </div>
  72. </form>
  73. </div>
  74. </div>
  75. {% endblock %}