PDF editor: add file size to label (Z#23226663) (#5965)

This commit is contained in:
Raphael Michel
2026-03-09 18:10:57 +01:00
committed by GitHub
parent 5099fa16e0
commit dc4556d428
2 changed files with 7 additions and 1 deletions

View File

@@ -264,12 +264,17 @@
The paper size will match the PDF.
{% endblocktrans %}
</p>
<p>
<p class="text-center">
<span class="btn btn-default fileinput-button background-button btn-block">
<i class="fa fa-upload"></i>
<span>{% trans "Upload PDF as background" %}</span>
<input id="fileupload" type="file" name="background" accept="application/pdf">
</span>
<small class="text-muted">
{% blocktrans trimmed with size=maxfilesize|filesizeformat %}
max. {{ size }}, smaller is better
{% endblocktrans %}
</small>
</p>
<p class="text-center">
<a class="btn btn-link background-download-button" href="{{ pdf }}" target="_blank">

View File

@@ -292,6 +292,7 @@ class BaseEditorView(EventPermissionRequiredMixin, TemplateView):
ctx['layout'] = json.dumps(self.get_current_layout())
ctx['title'] = self.title
ctx['locales'] = [p for p in settings.LANGUAGES if p[0] in self.request.event.settings.locales]
ctx['maxfilesize'] = self.maxfilesize
return ctx