Fix not showing errors for invalid contact uploads

This code should behave the same way as other CSV uploads [1],
but we had to write it in a hurry [2] and the way we show an
error with the upload field was based off that for PDF uploads,
where we show custom button text instead of an error [3].

This fixes the inconsistency, so that we see the same errors
for CSV uploads here as in other parts of the app.

[1]: 6b52735dac/app/templates/views/send.html (L25)
[2]: 1c02476ee7 (diff-aedd12af78c9737f1c3344d2afbb9c00878eccbcc754b2b3d9e6864c2ad2f7c3R32)
[3]: 3b3f74bbf0
This commit is contained in:
Ben Thorner
2021-12-01 16:59:30 +00:00
parent 6b52735dac
commit c0da7a27ed
2 changed files with 17 additions and 2 deletions

View File

@@ -40,8 +40,7 @@
{{ file_upload(
form.file,
allowed_file_extensions=allowed_file_extensions,
button_text='Upload your file again' if error else 'Choose file',
show_errors=False
button_text='Choose file',
)}}
</div>