mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-28 11:49:13 -04:00
Don’t allow personalisation in broadcast templates
Since we don’t have a way of filling in the personalisation at the moment we shouldn’t allow people to make templates that require it.
This commit is contained in:
@@ -47,6 +47,7 @@ from app.main.validators import (
|
||||
MustContainAlphanumericCharacters,
|
||||
NoCommasInPlaceHolders,
|
||||
NoEmbeddedImagesInSVG,
|
||||
NoPlaceholders,
|
||||
OnlySMSCharacters,
|
||||
ValidEmail,
|
||||
ValidGovEmail,
|
||||
@@ -1217,6 +1218,7 @@ class SMSTemplateForm(BaseTemplateForm):
|
||||
class BroadcastTemplateForm(SMSTemplateForm):
|
||||
def validate_template_content(self, field):
|
||||
OnlySMSCharacters(template_type='broadcast')(None, field)
|
||||
NoPlaceholders()(None, field)
|
||||
|
||||
|
||||
class LetterAddressForm(StripWhitespaceForm):
|
||||
|
||||
Reference in New Issue
Block a user