input letter address data in a single block

rather than in multiple placeholders - this is the first step towards
making postcodes non-required, which is the first step towards
international letters.

they still populate address_line_# and postcode fields under the hood -
to keep validation working the same, the last line always goes into
`postcode`.

the form normalises whitespace, removes extra new lines, and enforces
that you have between three and seven lines.

if the letter repeats address placeholders further down (eg "Dear
((address_line_1))"), then it'll fill those in as well. It'll still
prompt you to fill them in, but they'll be pre-filled.
This commit is contained in:
Leo Hemsted
2020-03-10 15:12:19 +00:00
parent df51bf6f5f
commit c4d839d4f5
7 changed files with 411 additions and 13 deletions

View File

@@ -259,6 +259,7 @@ class HeaderNavigation(Navigation):
'send_messages',
'send_notification',
'send_one_off',
'send_one_off_letter_address',
'send_one_off_step',
'send_test',
'no_cookie.send_test_preview',
@@ -386,6 +387,7 @@ class MainNavigation(Navigation):
'manage_template_folder',
'send_messages',
'send_one_off',
'send_one_off_letter_address',
'send_one_off_step',
'send_test',
'no_cookie.send_test_preview',
@@ -673,6 +675,7 @@ class CaseworkNavigation(Navigation):
'choose_from_contact_list',
'choose_template',
'send_one_off',
'send_one_off_letter_address',
'send_one_off_step',
'send_test',
'send_test_step',
@@ -1156,6 +1159,7 @@ class OrgNavigation(Navigation):
'send_messages',
'send_notification',
'send_one_off',
'send_one_off_letter_address',
'send_one_off_step',
'send_test',
'no_cookie.send_test_preview',