forked from CGM_Public/pretix_original
Badges: Create templates for common paper sizes (#3660)
* Badges: Create templates for common paper sizes * Add more sizes * format lazy
This commit is contained in:
@@ -25,9 +25,18 @@ from django.forms.models import ModelChoiceIterator
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from pretix.plugins.badges.models import BadgeItem, BadgeLayout
|
||||
from pretix.plugins.badges.templates import TEMPLATES
|
||||
|
||||
|
||||
class BadgeLayoutForm(forms.ModelForm):
|
||||
template = forms.ChoiceField(
|
||||
label=_('Template'),
|
||||
help_text=_('You can modify the layout or change to a different page size in the next step.'),
|
||||
choices=((k, v['label']) for k, v in TEMPLATES.items()),
|
||||
widget=forms.RadioSelect,
|
||||
initial='a6l',
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = BadgeLayout
|
||||
fields = ('name',)
|
||||
|
||||
Reference in New Issue
Block a user