mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Use tabs for all long settings and CRUD forms (#1352)
* First tabs
* Convert more pages
* Convert question page
* Item form
* Add item_formsets signal
* Revert "Add new signal nav_item"
This reverts commit 1ce613ff89.
* Formset is a word!
This commit is contained in:
@@ -460,6 +460,9 @@ class ItemUpdateForm(I18nModelForm):
|
||||
|
||||
|
||||
class ItemVariationsFormSet(I18nFormSet):
|
||||
template = "pretixcontrol/item/include_variations.html"
|
||||
title = _('Variations')
|
||||
|
||||
def clean(self):
|
||||
super().clean()
|
||||
for f in self.forms:
|
||||
@@ -516,6 +519,9 @@ class ItemVariationForm(I18nModelForm):
|
||||
|
||||
|
||||
class ItemAddOnsFormSet(I18nFormSet):
|
||||
title = _('Add-ons')
|
||||
template = "pretixcontrol/item/include_addons.html"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.event = kwargs.get('event')
|
||||
super().__init__(*args, **kwargs)
|
||||
@@ -581,6 +587,9 @@ class ItemAddOnForm(I18nModelForm):
|
||||
|
||||
|
||||
class ItemBundleFormSet(I18nFormSet):
|
||||
template = "pretixcontrol/item/include_bundles.html"
|
||||
title = _('Bundled products')
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.event = kwargs.get('event')
|
||||
self.item = kwargs.pop('item')
|
||||
|
||||
Reference in New Issue
Block a user