Skip to content

Commit 667ca66

Browse files
committed
Added a PDF accept filter to the references upload field
1 parent d453775 commit 667ca66

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

templates/PaymentOrder/form.html.twig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
{% block card_title %}<i class="fas fa-file-invoice-dollar fa-fw"></i> {% trans %}payment_order.new{% endtrans %}{% endblock %}
44

55
{% block head_javascripts %}
6+
{# Only allow to upload PDF: change the accept filter of the file input, as soon as the DOM is available #}
7+
<script>
8+
document.addEventListener('DOMContentLoaded', function() {
9+
document.getElementById('payment_order_references_file_file').accept = '.pdf';
10+
});
11+
</script>
612
{% endblock %}
713

814
{% block card_content %}

0 commit comments

Comments
 (0)