Fix missing CSRF token on send SMS page

As part of https://github.com/alphagov/notifications-admin/pull/187 the file
upload pattern was changed to auto-submit once a file had been picked. The
form that was submitted was, however, missing a CSRF token, as well as a submit
button for non-JS users.

This commit makes the file upload pattern self-contained, so that it will always
include a form with a CSRF token in a hidden input and a submit button, which is
then hidden when Javascript loads.
This commit is contained in:
Chris Hill-Scott
2016-02-22 21:37:32 +00:00
parent 7280e90c26
commit 16fbfe49a3
6 changed files with 28 additions and 28 deletions

View File

@@ -66,7 +66,7 @@ def test_upload_csvfile_with_invalid_phone_shows_check_page_with_errors(app_,
assert 'Your CSV file contained missing or invalid data' in content
assert '+44 123' in content
assert '+44 456' in content
assert 'Choose a CSV file' in content
assert 'Upload a CSV file' in content
@moto.mock_s3