Remove the code to handle optional address placeholders

Optional address placeholders aren’t a thing for one-off letters any
more, so we can tidy up the code a bit by removing the parts of the flow
that are accounting for them.
This commit is contained in:
Chris Hill-Scott
2020-04-09 15:36:13 +01:00
parent 53918f8d9f
commit 6c7e6fa64e
4 changed files with 3 additions and 11 deletions

View File

@@ -1372,7 +1372,6 @@ def get_placeholder_form_instance(
placeholder_name,
dict_to_populate_from,
template_type,
optional_placeholder=False,
allow_international_phone_numbers=False,
):
@@ -1389,8 +1388,6 @@ def get_placeholder_form_instance(
field = international_phone_number(label=placeholder_name)
else:
field = uk_mobile_number(label=placeholder_name)
elif optional_placeholder:
field = StringField(placeholder_name)
else:
field = StringField(placeholder_name, validators=[
DataRequired(message='Cannot be empty')