forked from CGM_Public/pretix_original
Add "attention" flag to products
This commit is contained in:
@@ -194,6 +194,7 @@ class ItemCreateForm(I18nModelForm):
|
||||
self.instance.allow_cancel = self.cleaned_data['copy_from'].allow_cancel
|
||||
self.instance.min_per_order = self.cleaned_data['copy_from'].min_per_order
|
||||
self.instance.max_per_order = self.cleaned_data['copy_from'].max_per_order
|
||||
self.instance.checkin_attention = self.cleaned_data['copy_from'].checkin_attention
|
||||
self.instance.position = (self.event.items.aggregate(p=Max('position'))['p'] or 0) + 1
|
||||
|
||||
instance = super().save(*args, **kwargs)
|
||||
@@ -283,6 +284,7 @@ class ItemUpdateForm(I18nModelForm):
|
||||
'allow_cancel',
|
||||
'max_per_order',
|
||||
'min_per_order',
|
||||
'checkin_attention'
|
||||
]
|
||||
widgets = {
|
||||
'available_from': forms.DateTimeInput(attrs={'class': 'datetimepicker'}),
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
{% bootstrap_field form.hide_without_voucher layout="horizontal" %}
|
||||
{% bootstrap_field form.allow_cancel layout="horizontal" %}
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{% trans "Check-in" %}</legend>
|
||||
{% bootstrap_field form.checkin_attention layout="horizontal" %}
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="col-xs-12 col-lg-2">
|
||||
<div class="panel panel-default">
|
||||
|
||||
Reference in New Issue
Block a user