Add option to copy existing template when adding

Sometimes when setting up a service you might have a few very similar
templates, in which only a small amount of content. Or you might even
have a few of services, which are used by different teams but have
similar templates.

Copy and pasting, especially from one service to another, is a pain.
This commit makes it easier by allowing users to copy an existing
template when choosing to add a new one, instead of starting from
scratch.
This commit is contained in:
Chris Hill-Scott
2018-07-19 12:30:04 +01:00
parent 078096eecc
commit 19632ea4ab
12 changed files with 293 additions and 10 deletions

View File

@@ -56,17 +56,19 @@ def test_letters_lets_in_without_permission(
@pytest.mark.parametrize('permissions, choices', [
(
['email', 'sms', 'letter'],
['Email', 'Text message', 'Letter']
['Email', 'Text message', 'Letter', 'Copy of an existing template']
),
(
['email', 'sms'],
['Email', 'Text message']
['Email', 'Text message', 'Copy of an existing template']
),
])
def test_given_option_to_add_letters_if_allowed(
logged_in_client,
service_one,
mocker,
mock_get_service_templates,
mock_get_organisations_and_services_for_user,
permissions,
choices,
):