diff --git a/nummi/main/templates/main/form/fileinput.html b/nummi/main/templates/main/form/fileinput.html index 7d6d7bc..c9ffd65 100644 --- a/nummi/main/templates/main/form/fileinput.html +++ b/nummi/main/templates/main/form/fileinput.html @@ -1,9 +1,11 @@ +{% load i18n %} +{% load main_extras %}
{{ widget.initial_text }} | - Fichier + {% translate "File" %} [{{ widget.value|extension }}] | - {% translate "File" %} + {% translate "File" %} [{{ invoice.file|extension }}] | {% translate "Delete" %} diff --git a/nummi/main/templatetags/main_extras.py b/nummi/main/templatetags/main_extras.py index 6cf7c9a..b1b67ff 100644 --- a/nummi/main/templatetags/main_extras.py +++ b/nummi/main/templatetags/main_extras.py @@ -45,3 +45,8 @@ def form_buttons(instance): @register.filter def remix(icon): return mark_safe(f"""""") + + +@register.filter +def extension(file): + return file.name.split(".")[-1].upper() |
---|