mirror of
https://github.com/pretix/pretix.git
synced 2026-05-10 16:04:02 +00:00
Allow to save invoice addresses and attendee profiles to customer account (#2084)
Co-authored-by: Raphael Michel <michel@rami.io> Co-authored-by: Richard Schreiber <wiffbi@gmail.com> Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
@@ -47,3 +47,14 @@ class QuestionsViewMixin(BaseQuestionsViewMixin):
|
||||
def _positions_for_questions(self):
|
||||
cart = get_cart(self.request)
|
||||
return sorted(list(cart), key=self._keyfunc)
|
||||
|
||||
def question_form_kwargs(self, cr):
|
||||
d = {
|
||||
'allow_save': bool(self.cart_customer),
|
||||
'initial': {},
|
||||
}
|
||||
|
||||
if f'saved_attendee_profile_{cr.pk}' in self.cart_session:
|
||||
d['initial']['saved_id'] = self.cart_session[f'saved_attendee_profile_{cr.pk}']
|
||||
|
||||
return d
|
||||
|
||||
Reference in New Issue
Block a user