mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Add question type: phone number (#1462)
* Add Phonenumber-Field as to Questions * Add setup requirements * Add list of ask-during-checkin restricted question types and enforce it * Fix requirements * Fix crash using custom locales * Re-format phone numbers when outputting to humans * Initialize country code field with a guess for the customer's country * Document TEL type in API docs
This commit is contained in:
committed by
Raphael Michel
parent
06a744ea2d
commit
54091b9721
@@ -977,6 +977,7 @@ class Question(LoggedModel):
|
||||
TYPE_TIME = "H"
|
||||
TYPE_DATETIME = "W"
|
||||
TYPE_COUNTRYCODE = "CC"
|
||||
TYPE_PHONENUMBER = "TEL"
|
||||
TYPE_CHOICES = (
|
||||
(TYPE_NUMBER, _("Number")),
|
||||
(TYPE_STRING, _("Text (one line)")),
|
||||
@@ -989,8 +990,10 @@ class Question(LoggedModel):
|
||||
(TYPE_TIME, _("Time")),
|
||||
(TYPE_DATETIME, _("Date and time")),
|
||||
(TYPE_COUNTRYCODE, _("Country code (ISO 3166-1 alpha-2)")),
|
||||
(TYPE_PHONENUMBER, _("Phone number")),
|
||||
)
|
||||
UNLOCALIZED_TYPES = [TYPE_DATE, TYPE_TIME, TYPE_DATETIME]
|
||||
ASK_DURING_CHECKIN_UNSUPPORTED = [TYPE_FILE, TYPE_PHONENUMBER]
|
||||
|
||||
event = models.ForeignKey(
|
||||
Event,
|
||||
|
||||
Reference in New Issue
Block a user