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.7 KiB

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