forked from CGM_Public/pretix_original
Check for required invoice information in other steps
This commit is contained in:
@@ -313,6 +313,14 @@ class QuestionsStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
|
|||||||
messages.warning(request, _('Please enter a valid email address.'))
|
messages.warning(request, _('Please enter a valid email address.'))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
if request.event.settings.invoice_address_required and (not self.invoice_address or not self.invoice_address.street):
|
||||||
|
messages.warning(request, _('Please enter your invoicing address.'))
|
||||||
|
return False
|
||||||
|
|
||||||
|
if request.event.settings.invoice_name_required and (not self.invoice_address or not self.invoice_address.name):
|
||||||
|
messages.warning(request, _('Please enter your name.'))
|
||||||
|
return False
|
||||||
|
|
||||||
for cp in self.positions:
|
for cp in self.positions:
|
||||||
answ = {
|
answ = {
|
||||||
aw.question_id: aw.answer for aw in cp.answers.all()
|
aw.question_id: aw.answer for aw in cp.answers.all()
|
||||||
|
|||||||
Reference in New Issue
Block a user