From 868847f778d386a7cf81cb722791863bd3c2a100 Mon Sep 17 00:00:00 2001 From: philipp Date: Wed, 20 Mar 2024 21:40:08 +0100 Subject: [PATCH] only accept pdf --- templates/admin/user/index.html.tera | 2 +- templates/includes/macros.html.tera | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/admin/user/index.html.tera b/templates/admin/user/index.html.tera index 5da8e7b..cc26f46 100644 --- a/templates/admin/user/index.html.tera +++ b/templates/admin/user/index.html.tera @@ -67,7 +67,7 @@ Beitrittserklärung herunterladen {% endif %} - {{ macros::input(label='Beitrittserklärung', name='membership_pdf', id=loop.index, type="file", readonly=allowed_to_edit == false) }} + {{ macros::input(label='Beitrittserklärung', name='membership_pdf', id=loop.index, type="file", readonly=allowed_to_edit == false, accept='application/pdf') }} {{ macros::input(label='DOB', name='dob', id=loop.index, type="text", value=user.dob, readonly=allowed_to_edit == false) }} {{ macros::input(label='Weight (kg)', name='weight', id=loop.index, type="text", value=user.weight, readonly=allowed_to_edit == false) }} {{ macros::input(label='Sex', name='sex', id=loop.index, type="text", value=user.sex, readonly=allowed_to_edit == false) }} diff --git a/templates/includes/macros.html.tera b/templates/includes/macros.html.tera index b958f4f..497b872 100644 --- a/templates/includes/macros.html.tera +++ b/templates/includes/macros.html.tera @@ -115,7 +115,7 @@
{% endmacro header %} - {% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false, wrapper_class='', pattern='', readonly=false) %} + {% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false, wrapper_class='', pattern='', readonly=false, accept='') %}
-- 2.45.2