diff --git a/app/main/views/templates.py b/app/main/views/templates.py index 599ce7c07..1cee80c79 100644 --- a/app/main/views/templates.py +++ b/app/main/views/templates.py @@ -707,6 +707,12 @@ def _get_content_count_error_and_message_for_template(template): f"too many" ) + if template.placeholders: + return False, Markup( + f"Will be charged as {message_count(template.fragment_count, template.template_type)} " + f"(not including personalization). {warning}" + ) + # If there's a warning, return it alone and hide the "Will be charged as..." text if warning: return False, Markup(warning) diff --git a/tests/app/main/views/test_templates.py b/tests/app/main/views/test_templates.py index f2998383e..b057580ab 100644 --- a/tests/app/main/views/test_templates.py +++ b/tests/app/main/views/test_templates.py @@ -2060,7 +2060,7 @@ def test_set_template_sender( "sms", False, "Hello ((name))", - "Will be charged as 1 text message.", + "Will be charged as 1 text message (not including personalization).", None, ), ( @@ -2068,7 +2068,7 @@ def test_set_template_sender( "sms", False, f'Hello (( {"a" * 999} ))', - "Will be charged as 1 text message.", + "Will be charged as 1 text message (not including personalization).", None, ), ],