mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
Merge pull request #1279 from alphagov/placeholders-in-contact-block
Enable placeholders in letter contact block
This commit is contained in:
@@ -502,7 +502,11 @@ class ServiceSmsSender(Form):
|
||||
|
||||
|
||||
class ServiceLetterContactBlock(Form):
|
||||
letter_contact_block = TextAreaField()
|
||||
letter_contact_block = TextAreaField(
|
||||
validators=[
|
||||
NoCommasInPlaceHolders()
|
||||
]
|
||||
)
|
||||
|
||||
def validate_letter_contact_block(form, field):
|
||||
line_count = field.data.strip().count('\n')
|
||||
|
||||
@@ -14,6 +14,8 @@ from flask_login import (
|
||||
login_required,
|
||||
current_user
|
||||
)
|
||||
|
||||
from notifications_utils.field import Field
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
from app import service_api_client
|
||||
@@ -46,7 +48,8 @@ def service_settings(service_id):
|
||||
organisation=organisation,
|
||||
letter_branding=letter_branding_organisations.get(
|
||||
current_service.get('dvla_organisation', '001')
|
||||
)
|
||||
),
|
||||
letter_contact_block=Field(current_service['letter_contact_block'], html='escape')
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user