Allow to explicitly set ticket language

This commit is contained in:
Raphael Michel
2019-12-20 18:17:00 +01:00
parent 614c40596f
commit eb7e938af6
4 changed files with 28 additions and 3 deletions

View File

@@ -198,11 +198,24 @@
</div>
<div class="col-sm-12 help-inline">
<p>
After you changed the page size, you need to create a new empty background. If you
want to use a custom background, it already needs to have the correct size.
{% blocktrans trimmed %}
After you changed the page size, you need to create a new empty background. If you
want to use a custom background, it already needs to have the correct size.
{% endblocktrans %}
</p>
</div>
</div>
<div class="row control-group pdf-info">
<div class="col-sm-12">
<label>{% trans "Prefered language" %}</label><br>
<select class="form-control" id="pdf-info-locale">
<option value="">{% trans "Order locale" %}</option>
{% for l in locales %}
<option value="{{ l.0 }}">{{ l.1 }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="row control-group position">
<div class="col-sm-6">
<label>{% trans "x (mm)" %}</label><br>

View File

@@ -4,6 +4,7 @@ import mimetypes
from datetime import timedelta
from io import BytesIO
from django.conf import settings
from django.core.files import File
from django.core.files.base import ContentFile
from django.core.files.storage import default_storage
@@ -217,6 +218,7 @@ class BaseEditorView(EventPermissionRequiredMixin, TemplateView):
ctx['variables'] = self.get_variables()
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]
return ctx