mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Don’t validate phone numbers when sending emails
If you have a placeholder called `((phone number))` in your email template, and you try to send a one-off message then the form input will attempt to validate your ‘phone number’. This is not helpful if you’re trying to put a landline number in your email, for example. This only affects messages being sent through the one-off interface. This commit makes the form be aware of template type, which fixes the problem.
This commit is contained in:
@@ -379,6 +379,7 @@ def send_test_step(service_id, template_id, step_index):
|
||||
form = get_placeholder_form_instance(
|
||||
current_placeholder,
|
||||
dict_to_populate_from=get_normalised_placeholders_from_session(),
|
||||
template_type=template.template_type,
|
||||
optional_placeholder=optional_placeholder,
|
||||
allow_international_phone_numbers='international_sms' in current_service['permissions'],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user