Set accepted files for branding upload

This commit is contained in:
Tom Byers
2020-12-16 11:24:52 +00:00
parent 1096d1f707
commit 51cc2a5296
4 changed files with 6 additions and 2 deletions

View File

@@ -24,7 +24,7 @@
<p class="govuk-body">
Logos should be PNG files, 108px high
</p>
{{ file_upload(form.file, button_text='{} logo'.format('Update' if email_branding else 'Upload')) }}
{{ file_upload(form.file, allowed_file_extensions='.png', button_text='{} logo'.format('Update' if email_branding else 'Upload')) }}
{% call form_wrapper() %}
<div class="form-group">
<div style='margin-top:15px;'>{{form.name}}</div>

View File

@@ -24,7 +24,7 @@
<p class="govuk-body">
Logos should be SVG files, cropped to artwork bounds and with all fonts outlined.
</p>
{{ file_upload(file_upload_form.file, button_text='{} logo'.format('Update' if is_update else 'Upload')) }}
{{ file_upload(file_upload_form.file, allowed_file_extensions='.svg', button_text='{} logo'.format('Update' if is_update else 'Upload')) }}
{% call form_wrapper() %}
<div class="form-group">
{{ letter_branding_details_form.name(param_extensions={