From c13ec18a27524289aca7bafac80087f725b7e928 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C4=93teris=20Caune?=
Date: Wed, 30 Oct 2019 18:31:10 +0200
Subject: [PATCH] 5 SMS & WhatsApp sends/mo for free plans
---
hc/accounts/models.py | 4 ++--
templates/emails/sms-limit-body-html.html | 2 +-
templates/emails/sms-limit-body-text.html | 5 ++---
templates/front/channels.html | 6 +++---
templates/payments/pricing.html | 22 +++++++++++-----------
5 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/hc/accounts/models.py b/hc/accounts/models.py
index 57f00aa0..9fab58ae 100644
--- a/hc/accounts/models.py
+++ b/hc/accounts/models.py
@@ -55,7 +55,7 @@ class Profile(models.Model):
token = models.CharField(max_length=128, blank=True)
current_project = models.ForeignKey("Project", models.SET_NULL, null=True)
last_sms_date = models.DateTimeField(null=True, blank=True)
- sms_limit = models.IntegerField(default=0)
+ sms_limit = models.IntegerField(default=5)
sms_sent = models.IntegerField(default=0)
team_limit = models.IntegerField(default=2)
sort = models.CharField(max_length=20, default="created")
@@ -112,7 +112,7 @@ class Profile(models.Model):
def send_sms_limit_notice(self, transport):
ctx = {"transport": transport, "limit": self.sms_limit}
if self.sms_limit != 500 and settings.USE_PAYMENTS:
- ctx["url"] = settings.SITE_ROOT + reverse("hc-billing")
+ ctx["url"] = settings.SITE_ROOT + reverse("hc-pricing")
emails.sms_limit(self.user.email, ctx)
diff --git a/templates/emails/sms-limit-body-html.html b/templates/emails/sms-limit-body-html.html
index 37710bec..61288aad 100644
--- a/templates/emails/sms-limit-body-html.html
+++ b/templates/emails/sms-limit-body-html.html
@@ -11,7 +11,7 @@ each month.
{% if url %}
-You can increase the monthly sending limit by upgrading your billing plan.
+You can increase the monthly sending limit by upgrading your billing plan. See Pricing.
{% endif %}
{% endblock %}
diff --git a/templates/emails/sms-limit-body-text.html b/templates/emails/sms-limit-body-text.html
index 54236e44..9b6c6d69 100644
--- a/templates/emails/sms-limit-body-text.html
+++ b/templates/emails/sms-limit-body-text.html
@@ -1,9 +1,8 @@
{% load hc_extras %}Hello,
We could not deliver a {{ transport }} notification because your {% site_name %} account has reached its monthly sending limit of {{ limit }} sends per month. The limit resets at the start of each month.
-{% if url %}You can increase the monthly sending limit by upgrading your billing plan:
-
-{{ url }}{% endif %}
+{% if url %}You can increase the monthly sending limit by upgrading your billing plan.
+{% endif %}
--
Regards,
diff --git a/templates/front/channels.html b/templates/front/channels.html
index 11b970f3..5cc4635c 100644
--- a/templates/front/channels.html
+++ b/templates/front/channels.html
@@ -249,7 +249,7 @@
High Trust Messaging for the Enterprise.
Add Integration
-
+
- SMS {% if use_payments %}(paid plans){% endif %}
+ SMS
Get a text message to your phone when a check goes down.
Add Integration
@@ -368,7 +368,7 @@
- WhatsApp {% if use_payments %}(paid plans){% endif %}
+ WhatsApp
Get a WhatsApp message when a check goes up or down.
Add Integration
diff --git a/templates/payments/pricing.html b/templates/payments/pricing.html
index aba47891..53a898f1 100644
--- a/templates/payments/pricing.html
+++ b/templates/payments/pricing.html
@@ -51,19 +51,19 @@