forked from CGM_Public/pretix_original
PDF editor: add file size to label (Z#23226663) (#5965)
This commit is contained in:
@@ -264,12 +264,17 @@
|
|||||||
The paper size will match the PDF.
|
The paper size will match the PDF.
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p class="text-center">
|
||||||
<span class="btn btn-default fileinput-button background-button btn-block">
|
<span class="btn btn-default fileinput-button background-button btn-block">
|
||||||
<i class="fa fa-upload"></i>
|
<i class="fa fa-upload"></i>
|
||||||
<span>{% trans "Upload PDF as background" %}</span>
|
<span>{% trans "Upload PDF as background" %}</span>
|
||||||
<input id="fileupload" type="file" name="background" accept="application/pdf">
|
<input id="fileupload" type="file" name="background" accept="application/pdf">
|
||||||
</span>
|
</span>
|
||||||
|
<small class="text-muted">
|
||||||
|
{% blocktrans trimmed with size=maxfilesize|filesizeformat %}
|
||||||
|
max. {{ size }}, smaller is better
|
||||||
|
{% endblocktrans %}
|
||||||
|
</small>
|
||||||
</p>
|
</p>
|
||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
<a class="btn btn-link background-download-button" href="{{ pdf }}" target="_blank">
|
<a class="btn btn-link background-download-button" href="{{ pdf }}" target="_blank">
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ class BaseEditorView(EventPermissionRequiredMixin, TemplateView):
|
|||||||
ctx['layout'] = json.dumps(self.get_current_layout())
|
ctx['layout'] = json.dumps(self.get_current_layout())
|
||||||
ctx['title'] = self.title
|
ctx['title'] = self.title
|
||||||
ctx['locales'] = [p for p in settings.LANGUAGES if p[0] in self.request.event.settings.locales]
|
ctx['locales'] = [p for p in settings.LANGUAGES if p[0] in self.request.event.settings.locales]
|
||||||
|
ctx['maxfilesize'] = self.maxfilesize
|
||||||
return ctx
|
return ctx
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user