Compare commits

..

30 Commits

Author SHA1 Message Date
Richard Schreiber
4e1e082ee3 fix icon alignment 2023-06-05 09:40:56 +02:00
Richard Schreiber
9a57371f9e move seat-info inside panel next to date-info 2023-06-05 09:40:56 +02:00
Richard Schreiber
8bc7045bba add seating-info to panel-title 2023-06-05 09:40:56 +02:00
Richard Schreiber
3c29223e5c Checkout/Add-ons: Do not show products without add-ons 2023-06-05 09:40:56 +02:00
Raphael Michel
35350a13d6 Fix #3360 -- Allow to revoke devices before initialized 2023-06-04 18:06:00 +02:00
Raphael Michel
0d93f7f52f Fix crash in name rendering (PRETIXEU-8GS) 2023-06-03 21:49:14 +02:00
dependabot[bot]
170dcf93e7 Update pypdf requirement from ==3.8.* to ==3.9.* (#3377)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-02 21:26:17 +02:00
dependabot[bot]
9319202213 Bump @babel/core from 7.21.5 to 7.22.1 in /src/pretix/static/npm_dir (#3373)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-02 21:25:26 +02:00
dependabot[bot]
bfd0eee2c1 Update mt-940 requirement from ==4.23.* to ==4.30.* (#3345)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
2023-06-02 21:25:15 +02:00
dependabot[bot]
8570f53ed0 Update django-otp requirement from ==1.1.* to ==1.2.* (#3338)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-02 20:08:56 +02:00
Raphael Michel
f56f6dd628 Voucher: Add link to order in voucher history 2023-06-02 20:07:12 +02:00
Richard Schreiber
413fabd821 Product list: add border to disabled spinner buttons (#3359) 2023-06-02 20:04:42 +02:00
Julian Rother
9813e59210 API: Fix crash when creating addons with order change endpoint (#3363) 2023-06-02 20:00:40 +02:00
Richard Schreiber
d91d942eac Invoicing: Add order-code to organizer CC mail (Z#23123051) (#3370) 2023-06-02 19:59:31 +02:00
dependabot[bot]
22104f79bd Bump @rollup/plugin-node-resolve from 15.0.2 to 15.1.0 in /src/pretix/static/npm_dir (#3374)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-02 19:59:12 +02:00
dependabot[bot]
f289ad9e4f Bump @babel/preset-env from 7.21.5 to 7.22.4 in /src/pretix/static/npm_dir (#3375)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-02 19:59:00 +02:00
Raphael Michel
f81a734716 Translations: Update Chinese (Traditional)
Currently translated at 63.6% (3384 of 5314 strings)

Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/zh_Hant/

powered by weblate
2023-06-02 19:55:04 +02:00
Raphael Michel
7a27a42e79 Translations: Update Chinese (Traditional)
Currently translated at 63.6% (3384 of 5314 strings)

Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/zh_Hant/

powered by weblate
2023-06-02 19:55:04 +02:00
Yucheng Lin
65a2bab9bb Translations: Update Chinese (Traditional)
Currently translated at 63.6% (3384 of 5314 strings)

Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/zh_Hant/

powered by weblate
2023-06-02 19:55:04 +02:00
Yucheng Lin
a26f46b619 Translations: Update Chinese (Traditional)
Currently translated at 63.2% (3359 of 5314 strings)

Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/zh_Hant/

powered by weblate
2023-06-02 19:55:04 +02:00
Hans Fraiponts
5c37c85415 Translations: Update Dutch
Currently translated at 85.2% (4531 of 5314 strings)

Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/nl/

powered by weblate
2023-06-02 19:55:04 +02:00
Yucheng Lin
8ddba36690 Translations: Update Chinese (Traditional)
Currently translated at 61.6% (3275 of 5314 strings)

Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/zh_Hant/

powered by weblate
2023-06-02 19:55:04 +02:00
Thomas Vranken
f9bf05e09b Translations: Update Dutch
Currently translated at 85.2% (4530 of 5314 strings)

Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/nl/

powered by weblate
2023-06-02 19:55:04 +02:00
Raphael Michel
8471422bba Fix grammer error in settings help text 2023-06-02 19:08:21 +02:00
Raphael Michel
ee9acebe03 Devices: Fix crash in form validation 2023-06-02 17:19:25 +02:00
Raphael Michel
35d2a73f75 Voucher creation: Fix crash in validation (PRETIXEU-8GF) 2023-06-02 17:19:25 +02:00
Richard Schreiber
eb3eca45b5 Checkout/Addon: fix spinner button class name 2023-06-01 16:12:54 +02:00
Martin Gross
f7816924b0 Add Chinese (Traditional) (zh_Hant) to list of available languages. 2023-05-31 13:06:31 +02:00
Raphael Michel
12c3fef390 Docs: Add missing navigation node 2023-05-31 12:58:54 +02:00
Raphael Michel
8e39aaa292 Bump version to 4.21.0.dev0 2023-05-31 12:45:24 +02:00
28 changed files with 1120 additions and 861 deletions

View File

@@ -18,6 +18,7 @@ at :ref:`plugin-docs`.
item_variations
item_bundles
item_add-ons
item_meta_properties
questions
question_options
quotas

View File

@@ -51,7 +51,7 @@ dependencies = [
"django-markup",
"django-mysql",
"django-oauth-toolkit==2.2.*",
"django-otp==1.1.*",
"django-otp==1.2.*",
"django-phonenumber-field==7.1.*",
"django-redis==5.2.*",
"django-scopes==2.0.*",
@@ -68,7 +68,7 @@ dependencies = [
"lxml",
"markdown==3.4.3", # 3.3.5 requires importlib-metadata>=4.4, but django-bootstrap3 requires importlib-metadata<3.
# We can upgrade markdown again once django-bootstrap3 upgrades or once we drop Python 3.6 and 3.7
"mt-940==4.23.*",
"mt-940==4.30.*",
"oauthlib==3.2.*",
"openpyxl==3.1.*",
"packaging",
@@ -77,13 +77,12 @@ dependencies = [
"PyJWT==2.6.*",
"phonenumberslite==8.13.*",
"Pillow==9.5.*",
"pretix-plugin-build",
"protobuf==4.23.*",
"psycopg2-binary",
"pycountry",
"pycparser==2.21",
"pycryptodome==3.18.*",
"pypdf==3.8.*",
"pypdf==3.9.*",
"python-bidi==0.4.*", # Support for Arabic in reportlab
"python-dateutil==2.8.*",
"python-u2flib-server==4.*",

View File

@@ -29,6 +29,7 @@ sys.path.append(str(Path.cwd() / 'src'))
def _CustomBuild(*args, **kwargs):
print(sys.path)
from pretix._build import CustomBuild
return CustomBuild(*args, **kwargs)

View File

@@ -19,4 +19,4 @@
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# <https://www.gnu.org/licenses/>.
#
__version__ = "4.20.1"
__version__ = "4.21.0.dev0"

View File

@@ -80,6 +80,7 @@ ALL_LANGUAGES = [
('de-informal', _('German (informal)')),
('ar', _('Arabic')),
('zh-hans', _('Chinese (simplified)')),
('zh-hant', _('Chinese (traditional)')),
('cs', _('Czech')),
('da', _('Danish')),
('nl', _('Dutch')),

View File

@@ -45,10 +45,6 @@ def npm_install():
class CustomBuild(build):
def run(self):
if "src" not in os.listdir(".") or "pretix" not in os.listdir("src"):
# Only run this command on the pretix module, not on other modules even if it's registered globally
# in some cases
return build.run(self)
if "PRETIX_DOCKER_BUILD" in os.environ:
return # this is a hack to allow calling this file early in our docker build to make use of caching
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pretix._build_settings")
@@ -72,10 +68,6 @@ class CustomBuild(build):
class CustomBuildExt(build_ext):
def run(self):
if "src" not in os.listdir(".") or "pretix" not in os.listdir("src"):
# Only run this command on the pretix module, not on other modules even if it's registered globally
# in some cases
return build_ext.run(self)
if "PRETIX_DOCKER_BUILD" in os.environ:
return # this is a hack to allow calling this file early in our docker build to make use of caching
npm_install()

View File

@@ -70,6 +70,8 @@ class OrderPositionCreateForExistingOrderSerializer(OrderPositionCreateSerialize
def validate(self, data):
data = super().validate(data)
if 'order' in self.context:
data['order'] = self.context['order']
if data.get('addon_to'):
try:
data['addon_to'] = data['order'].positions.get(positionid=data['addon_to'])

View File

@@ -93,6 +93,9 @@ class InitializeView(APIView):
if device.initialized:
raise ValidationError({'token': ['This initialization token has already been used.']})
if device.revoked:
raise ValidationError({'token': ['This initialization token has been revoked.']})
device.initialized = now()
device.hardware_brand = serializer.validated_data.get('hardware_brand')
device.hardware_model = serializer.validated_data.get('hardware_model')

View File

@@ -178,7 +178,7 @@ class LoggedModel(models.Model, LoggingMixin):
return LogEntry.objects.filter(
content_type=self.logs_content_type, object_id=self.pk
).select_related('user', 'event', 'oauth_application', 'api_token', 'device')
).select_related('user', 'event', 'event__organizer', 'oauth_application', 'api_token', 'device')
class LockModel:

View File

@@ -510,7 +510,7 @@ def send_invoices_to_organizer(sender, **kwargs):
with transaction.atomic():
qs = Invoice.objects.filter(
sent_to_organizer__isnull=True
).prefetch_related('event').select_for_update(of=OF_SELF, skip_locked=connection.features.has_select_for_update_skip_locked)
).prefetch_related('event', 'order').select_for_update(of=OF_SELF, skip_locked=connection.features.has_select_for_update_skip_locked)
for i in qs[:batch_size]:
if i.event.settings.invoice_email_organizer:
with language(i.event.settings.locale):
@@ -519,11 +519,12 @@ def send_invoices_to_organizer(sender, **kwargs):
subject=_('New invoice: {number}').format(number=i.number),
template=LazyI18nString.from_gettext(_(
'Hello,\n\n'
'a new invoice for {event} has been created, see attached.\n\n'
'a new invoice for order {order} at {event} has been created, see attached.\n\n'
'We are sending this email because you configured us to do so in your event settings.'
)),
context={
'event': str(i.event),
'order': str(i.order),
},
locale=i.event.settings.locale,
event=i.event,

View File

@@ -1409,7 +1409,7 @@ DEFAULTS = {
'form_class': forms.BooleanField,
'form_kwargs': dict(
label=_("Show number of check-ins to customer"),
help_text=_('With this option enabled, your customers will be able how many times they entered '
help_text=_('With this option enabled, your customers will be able to see how many times they entered '
'the event. This is usually not necessary, but might be useful in combination with tickets '
'that are usable a specific number of times, so customers can see how many times they have '
'already been used. Exits or failed scans will not be counted, and the user will not see '
@@ -3256,7 +3256,7 @@ def concatenation_for_salutation(d):
def get_name_parts_localized(name_parts, key):
value = name_parts.get(key, "")
if key == "salutation":
if key == "salutation" and value:
return pgettext_lazy("person_name_salutation", value)
return value

View File

@@ -273,7 +273,7 @@ class DeviceForm(forms.ModelForm):
def clean(self):
d = super().clean()
if not d['all_events'] and not d['limit_events']:
if not d['all_events'] and not d.get('limit_events'):
raise ValidationError(_('Your device will not have access to anything, please select some events.'))
return d

View File

@@ -386,17 +386,18 @@ class VoucherBulkForm(VoucherForm):
def clean(self):
data = super().clean()
vouchers = self.instance.event.vouchers.annotate(
code_upper=Upper('code')
).filter(code_upper__in=[c.upper() for c in data['codes']])
if vouchers.exists():
raise ValidationError(_('A voucher with one of these codes already exists.'))
if 'codes' in data:
vouchers = self.instance.event.vouchers.annotate(
code_upper=Upper('code')
).filter(code_upper__in=[c.upper() for c in data['codes']])
if vouchers.exists():
raise ValidationError(_('A voucher with one of these codes already exists.'))
codes_seen = set()
for c in data['codes']:
if c in codes_seen:
raise ValidationError(_('The voucher code {code} appears in your list twice.').format(code=c))
codes_seen.add(c)
codes_seen = set()
for c in data['codes']:
if c in codes_seen:
raise ValidationError(_('The voucher code {code} appears in your list twice.').format(code=c))
codes_seen.add(c)
if data.get('send') and not all([data.get('send_subject'), data.get('send_message'), data.get('send_recipients')]):
raise ValidationError(_('If vouchers should be sent by email, subject, message and recipients need to be specified.'))

View File

@@ -571,6 +571,17 @@ def pretixcontrol_logentry_display(sender: Event, logentry: LogEntry, **kwargs):
else:
data['value'] = LazyI18nString(data['value'])
if logentry.action_type == "pretix.voucher.redeemed":
data = defaultdict(lambda: '?', data)
url = reverse('control:event.order', kwargs={
'event': logentry.event.slug,
'organizer': logentry.event.organizer.slug,
'code': data['order_code']
})
return mark_safe(plains[logentry.action_type].format(
order_code='<a href="{}">{}</a>'.format(url, data['order_code']),
))
if logentry.action_type in plains:
data = defaultdict(lambda: '?', data)
return plains[logentry.action_type].format_map(data)

View File

@@ -162,16 +162,19 @@
<a href="{% url "control:organizer.device.connect" organizer=request.organizer.slug device=d.id %}"
class="btn btn-primary btn-sm"><i class="fa fa-link"></i>
{% trans "Connect" %}</a>
{% elif d.api_token %}
{% endif %}
{% if not d.initialized or d.api_token %}
<a href="{% url "control:organizer.device.revoke" organizer=request.organizer.slug device=d.id %}"
class="btn btn-default btn-sm">
{% trans "Revoke access" %}</a>
{% endif %}
<a href="{% url "control:organizer.device.logs" organizer=request.organizer.slug device=d.id %}"
class="btn btn-default btn-sm">
<span class="fa fa-list-alt"></span>
{% trans "Logs" %}
</a>
{% if d.initialized %}
<a href="{% url "control:organizer.device.logs" organizer=request.organizer.slug device=d.id %}"
class="btn btn-default btn-sm">
<span class="fa fa-list-alt"></span>
{% trans "Logs" %}
</a>
{% endif %}
<a href="{% url "control:organizer.device.edit" organizer=request.organizer.slug device=d.id %}"
class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
</td>

View File

@@ -1184,7 +1184,7 @@ class DeviceRevokeView(OrganizerDetailViewMixin, OrganizerPermissionRequiredMixi
def get(self, request, *args, **kwargs):
self.object = self.get_object()
if not self.object.api_token:
if self.object.revoked:
messages.success(request, _('This device currently does not have access.'))
return redirect(reverse('control:organizer.devices', kwargs={
'organizer': self.request.organizer.slug,

View File

@@ -7,16 +7,16 @@ msgstr ""
"Project-Id-Version: 1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-31 09:01+0000\n"
"PO-Revision-Date: 2023-04-27 01:00+0000\n"
"Last-Translator: Julian Geraerds <julian.geraerds@itisours.nl>\n"
"Language-Team: Dutch <https://translate.pretix.eu/projects/pretix/pretix/nl/"
">\n"
"PO-Revision-Date: 2023-06-02 13:44+0000\n"
"Last-Translator: Hans Fraiponts <fraiponts@gmail.com>\n"
"Language-Team: Dutch <https://translate.pretix.eu/projects/pretix/pretix/nl/>"
"\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.16.4\n"
"X-Generator: Weblate 4.17\n"
#: htmlcov/pretix_control_views_dashboards_py.html:963
#: pretix/control/templates/pretixcontrol/events/index.html:140
@@ -21804,7 +21804,7 @@ msgstr "Ingetrokken"
#: pretix/control/templates/pretixcontrol/organizers/devices.html:164
msgid "Connect"
msgstr "Verbinden"
msgstr "Verbind"
#: pretix/control/templates/pretixcontrol/organizers/devices.html:173
#: pretix/control/templates/pretixcontrol/organizers/webhooks.html:76
@@ -29586,7 +29586,7 @@ msgstr "Factuurinstellingen"
#: pretix/presale/templates/pretixpresale/event/base.html:179
#: pretix/presale/templates/pretixpresale/organizers/base.html:97
msgid "Imprint"
msgstr "Afdruk"
msgstr "Info organisator"
#: pretix/presale/templates/pretixpresale/event/checkout_addons.html:10
msgid ""
@@ -29687,7 +29687,7 @@ msgstr "Factuurgegevens bewerken"
#: pretix/presale/templates/pretixpresale/event/checkout_questions.html:23
#: pretix/presale/templates/pretixpresale/event/order_modify.html:33
msgid "Contact information"
msgstr "Contactgegevens"
msgstr "Contact informatie"
#: pretix/presale/templates/pretixpresale/event/checkout_confirm.html:128
msgid "Modify contact information"
@@ -31385,10 +31385,8 @@ msgstr "Bevestig de volgende betalingsdetails."
#: pretix/presale/templates/pretixpresale/event/resend_link.html:4
#: pretix/presale/templates/pretixpresale/event/resend_link.html:11
#, fuzzy
#| msgid "Resend order link"
msgid "Resend order links"
msgstr "Bestellink opnieuw versturen"
msgstr "Bestellingslinks opnieuw versturen"
#: pretix/presale/templates/pretixpresale/event/resend_link.html:15
msgid ""
@@ -31508,10 +31506,8 @@ msgstr "Kalender"
#: pretix/presale/templates/pretixpresale/fragment_calendar.html:52
#: pretix/presale/templates/pretixpresale/fragment_day_calendar.html:65
#: pretix/presale/templates/pretixpresale/fragment_week_calendar.html:37
#, fuzzy
#| msgid "Continue"
msgid "(continued)"
msgstr "Doorgaan"
msgstr "(gaat verder)"
#: pretix/presale/templates/pretixpresale/fragment_calendar.html:61
#: pretix/presale/templates/pretixpresale/fragment_week_calendar.html:46

View File

@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-31 09:01+0000\n"
"PO-Revision-Date: 2023-05-30 21:00+0000\n"
"Last-Translator: Yucheng Lin <yuchenglinedu@gmail.com>\n"
"PO-Revision-Date: 2023-06-02 17:12+0000\n"
"Last-Translator: Raphael Michel <michel@rami.io>\n"
"Language-Team: Chinese (Traditional) <https://translate.pretix.eu/projects/"
"pretix/pretix/zh_Hant/>\n"
"Language: zh_Hant\n"
@@ -40,7 +40,7 @@ msgstr "預售結束"
#: pretix/control/templates/pretixcontrol/organizers/detail.html:108
#: pretix/control/templates/pretixcontrol/subevents/index.html:159
msgid "Presale not started"
msgstr ""
msgstr "預售尚未開始"
#: htmlcov/pretix_control_views_dashboards_py.html:969
#: pretix/control/templates/pretixcontrol/events/index.html:146
@@ -4674,16 +4674,15 @@ msgid "Subevent cannot be null for event series."
msgstr "對於事件系列,子事件不能為空白。"
#: pretix/base/models/items.py:2005
#, fuzzy
#| msgid "Required for events"
msgid "Required for products"
msgstr "活動所需"
msgstr "商品所需"
#: pretix/base/models/items.py:2006
msgid ""
"If checked, this property must be set in each product. Does not apply if a "
"default value is set."
msgstr ""
msgstr "如果已選取,則必須在每個商品中設定該屬性。假如已設定該屬性為預設值,則不適用"
"。"
#: pretix/base/models/log.py:159
#, python-brace-format
@@ -7883,21 +7882,22 @@ msgstr ""
#: pretix/base/settings.py:607
msgid "Minimum length of invoice number after prefix"
msgstr ""
msgstr "發票前綴編號的最小長度"
#: pretix/base/settings.py:608
msgid ""
"The part of your invoice number after your prefix will be filled up with "
"leading zeros up to this length, e.g. INV-001 or INV-00001."
msgstr ""
msgstr "發票編號中前綴後面的部分將用前導零填充,直至此長度,例如 INV-001 或 "
"INV-00001。"
#: pretix/base/settings.py:619
msgid "Generate invoices with consecutive numbers"
msgstr ""
msgstr "生成具有連續編號的發票"
#: pretix/base/settings.py:620
msgid "If deactivated, the order code will be used in the invoice number."
msgstr ""
msgstr "如果停用,訂單代碼將在發票編號中使用。"
#: pretix/base/settings.py:629
msgid "Invoice number prefix"
@@ -7919,21 +7919,21 @@ msgstr ""
"(帶世紀)%y不帶世紀插入發票的年份或使用 %m 和 %d 插入月份中的某一天。"
#: pretix/base/settings.py:642 pretix/base/settings.py:664
#, fuzzy, python-brace-format
#| msgid "Please do not use special characters in names."
#, python-brace-format
msgid "Please only use the characters {allowed} in this field."
msgstr "請不要在名稱中使用特殊字元。"
msgstr "請僅在此欄位中使用字元{allowed}。"
#: pretix/base/settings.py:655
msgid "Invoice number prefix for cancellations"
msgstr ""
msgstr "取消的發票編號前綴"
#: pretix/base/settings.py:656
msgid ""
"This will be prepended to invoice numbers of cancellations. If you leave "
"this field empty, the same numbering scheme will be used that you configured "
"for regular invoices."
msgstr ""
msgstr "這將附加到取消的發票編號前面。如果將此欄位留空,則將使用你為常規發票設定的相"
"同編號方案。"
#: pretix/base/settings.py:677
msgid "Highlight order code to make it stand out visibly"
@@ -7950,7 +7950,7 @@ msgstr "字體"
#: pretix/base/settings.py:714
msgid "Length of ticket codes"
msgstr ""
msgstr "票證代碼的長度"
#: pretix/base/settings.py:741
msgid "Reservation period"
@@ -7959,16 +7959,16 @@ msgstr "保留期"
#: pretix/base/settings.py:743
msgid ""
"The number of minutes the items in a user's cart are reserved for this user."
msgstr ""
msgstr "使用者購物車中的商品為該使用者保留的數分鐘。"
#: pretix/base/settings.py:752
msgid ""
"Directly redirect to check-out after a product has been added to the cart."
msgstr ""
msgstr "將商品添加到購物車後直接重定向至結帳。"
#: pretix/base/settings.py:761
msgid "End of presale text"
msgstr ""
msgstr "結束預售文件"
#: pretix/base/settings.py:764
msgid ""
@@ -7987,7 +7987,7 @@ msgstr "指導文件"
msgid ""
"This text will be shown above the payment options. You can explain the "
"choices to the user here, if you want."
msgstr ""
msgstr "此文字將顯示在付款選項上方。如果需要,可以在此處向用戶解釋選擇。"
#: pretix/base/settings.py:790 pretix/base/settings.py:799
msgid "in days"
@@ -8005,11 +8005,12 @@ msgstr "設定付款期限"
msgid ""
"If using days, the order will expire at the end of the last day. Using "
"minutes is more exact, but should only be used for real-time payment methods."
msgstr ""
msgstr "如果使用天數,訂單將在最後一天結束時過期。使用分鐘更準確,但這應用只用於即時"
"付款方式。"
#: pretix/base/settings.py:812
msgid "Payment term in days"
msgstr ""
msgstr "付款期限(天)"
#: pretix/base/settings.py:819
msgid ""
@@ -8024,7 +8025,7 @@ msgstr ""
#: pretix/base/settings.py:837
msgid "Only end payment terms on weekdays"
msgstr ""
msgstr "只在工作日結束付款條件"
#: pretix/base/settings.py:838
msgid ""
@@ -8188,7 +8189,7 @@ msgstr "國內稅號ID"
#: pretix/base/settings.py:1073
msgid "e.g. tax number in Germany, ABN in Australia, …"
msgstr ""
msgstr "例如德國的稅號澳大利亞的ABN,…"
#: pretix/base/settings.py:1082
msgid "EU VAT ID"
@@ -8196,7 +8197,7 @@ msgstr "歐盟增值稅ID"
#: pretix/base/settings.py:1095
msgid "e.g. With this document, we sent you the invoice for your ticket order."
msgstr ""
msgstr "例如,透過此文件,我們向你發送機票訂單的發票。"
#: pretix/base/settings.py:1098
msgid "Introductory text"
@@ -8204,7 +8205,7 @@ msgstr "介紹文件"
#: pretix/base/settings.py:1099
msgid "Will be printed on every invoice above the invoice rows."
msgstr ""
msgstr "將列印在發票行上方的每張發票上。"
#: pretix/base/settings.py:1112
msgid ""
@@ -8218,13 +8219,13 @@ msgstr "額外文件"
#: pretix/base/settings.py:1116
msgid "Will be printed on every invoice below the invoice total."
msgstr ""
msgstr "將會列印在每張發票總額以下的發票上。"
#: pretix/base/settings.py:1129
msgid ""
"e.g. your bank details, legal details like your VAT ID, registration "
"numbers, etc."
msgstr ""
msgstr "例如,你的銀行詳細資訊、增值稅號等法律詳細資訊、註冊號等。"
#: pretix/base/settings.py:1132
msgid "Footer"
@@ -8234,11 +8235,11 @@ msgstr "腳註"
msgid ""
"Will be printed centered and in a smaller font at the end of every invoice "
"page."
msgstr ""
msgstr "將在每張發票頁面的末尾以較小的字體居中列印。"
#: pretix/base/settings.py:1146
msgid "Attach invoices to emails"
msgstr ""
msgstr "將發票夾帶到電子郵件"
#: pretix/base/settings.py:1147
msgid ""
@@ -8253,7 +8254,7 @@ msgstr ""
#: pretix/base/settings.py:1159
msgid "Email address to receive a copy of each invoice"
msgstr ""
msgstr "用於接收每張發票副本的電子郵件位址"
#: pretix/base/settings.py:1160
msgid ""
@@ -8266,12 +8267,12 @@ msgstr ""
#: pretix/base/settings.py:1171
msgid "Show items outside presale period"
msgstr ""
msgstr "顯示預售期以外的商品"
#: pretix/base/settings.py:1172
msgid ""
"Show item details before presale has started and after presale has ended"
msgstr ""
msgstr "在預售開始前和預售結束後顯示商品詳細資訊"
#: pretix/base/settings.py:1192
msgid "Available languages"
@@ -8297,7 +8298,7 @@ msgstr ""
#: pretix/base/settings.py:1231
msgid "Show event times and dates on the ticket shop"
msgstr ""
msgstr "在售票處顯示起始時間和日期"
#: pretix/base/settings.py:1232
msgid ""
@@ -8309,37 +8310,37 @@ msgstr ""
#: pretix/base/settings.py:1242
msgid "Show event end date"
msgstr ""
msgstr "顯示活動結束日期"
#: pretix/base/settings.py:1243
msgid "If disabled, only event's start date will be displayed to the public."
msgstr ""
msgstr "如果禁用,則只向公眾顯示活動的開始日期。"
#: pretix/base/settings.py:1252
msgid "Show dates with time"
msgstr ""
msgstr "顯示日期與時間"
#: pretix/base/settings.py:1253
msgid ""
"If disabled, the event's start and end date will be displayed without the "
"time of day."
msgstr ""
msgstr "如果禁用,將顯示事件的開始和結束日期,而不顯示一天中的時間。"
#: pretix/base/settings.py:1262
msgid "Hide all products that are sold out"
msgstr ""
msgstr "隱藏所有已售罄的產品"
#: pretix/base/settings.py:1272 pretix/control/forms/event.py:1547
msgid "Publicly show how many tickets of a certain type are still available."
msgstr ""
msgstr "公開顯示某種類型的票證數量仍然可用。"
#: pretix/base/settings.py:1281
msgid "Ask search engines not to index the ticket shop"
msgstr ""
msgstr "要求搜尋引擎不要索引售票處"
#: pretix/base/settings.py:1290
msgid "Show variations of a product expanded by default"
msgstr ""
msgstr "顯示預設展示的商品的類型"
#: pretix/base/settings.py:1299
msgid "Enable waiting list"
@@ -8358,7 +8359,7 @@ msgstr ""
#: pretix/base/settings.py:1311
msgid "Automatic waiting list assignments"
msgstr ""
msgstr "自動候補名單分配"
#: pretix/base/settings.py:1312
msgid ""
@@ -8374,7 +8375,7 @@ msgstr ""
#: pretix/base/settings.py:1328
msgid "Waiting list response time"
msgstr ""
msgstr "等待名單回應時間"
#: pretix/base/settings.py:1331
msgid ""
@@ -8387,11 +8388,11 @@ msgstr ""
#: pretix/base/settings.py:1342
msgid "Ask for a name"
msgstr ""
msgstr "查詢姓名"
#: pretix/base/settings.py:1343
msgid "Ask for a name when signing up to the waiting list."
msgstr ""
msgstr "註冊等候名單時查詢姓名。"
#: pretix/base/settings.py:1352
msgid "Require name"
@@ -8399,15 +8400,15 @@ msgstr "需要姓名"
#: pretix/base/settings.py:1353
msgid "Require a name when signing up to the waiting list.."
msgstr ""
msgstr "註冊等候名單時需要姓名。"
#: pretix/base/settings.py:1363
msgid "Ask for a phone number"
msgstr ""
msgstr "詢問電話號碼"
#: pretix/base/settings.py:1364
msgid "Ask for a phone number when signing up to the waiting list."
msgstr ""
msgstr "註冊等候名單時詢問電話號碼。"
#: pretix/base/settings.py:1373
msgid "Require phone number"
@@ -8415,25 +8416,25 @@ msgstr "需要電話號碼"
#: pretix/base/settings.py:1374
msgid "Require a phone number when signing up to the waiting list.."
msgstr ""
msgstr "註冊等候名單時需要電話號碼。"
#: pretix/base/settings.py:1384
msgid "Phone number explanation"
msgstr ""
msgstr "電話號碼說明"
#: pretix/base/settings.py:1387
msgid ""
"If you ask for a phone number, explain why you do so and what you will use "
"the phone number for."
msgstr ""
msgstr "如果你要求提供電話號碼,請解釋你這樣做的原因,以及你將使用該電話號碼的目的。"
#: pretix/base/settings.py:1399
msgid "Maximum number of entries per email address for the same product"
msgstr ""
msgstr "同一商品的每件電子郵件位址的最大條目數"
#: pretix/base/settings.py:1411
msgid "Show number of check-ins to customer"
msgstr ""
msgstr "對客戶顯示簽到次數"
#: pretix/base/settings.py:1412
msgid ""
@@ -8450,11 +8451,11 @@ msgstr ""
#: pretix/base/settings.py:1425
msgid "Allow users to download tickets"
msgstr ""
msgstr "允許用戶下載票證"
#: pretix/base/settings.py:1426
msgid "If this is off, nobody can download a ticket."
msgstr ""
msgstr "如果關閉此功能,則沒有人可以下載票證。"
#: pretix/base/settings.py:1435
msgid "Download date"
@@ -8471,7 +8472,7 @@ msgstr ""
#: pretix/base/settings.py:1447
msgid "Generate tickets for add-on products and bundled products"
msgstr ""
msgstr "為附加商品和捆綁商品產生票證"
#: pretix/base/settings.py:1448
msgid ""
@@ -8484,28 +8485,29 @@ msgstr ""
#: pretix/base/settings.py:1461
msgid "Generate tickets for all products"
msgstr ""
msgstr "為所有商品產生門票"
#: pretix/base/settings.py:1462
msgid ""
"If turned off, tickets are only issued for products that are marked as an "
"\"admission ticket\"in the product settings. You can also turn off ticket "
"issuing in every product separately."
msgstr ""
msgstr "如果關閉,則只對在產品設定中,標記為「入場券」的產商品出產生票。你還可以單獨"
"關閉為每項產品的產生票。"
#: pretix/base/settings.py:1474
msgid "Generate tickets for pending orders"
msgstr ""
msgstr "為訂單產生票"
#: pretix/base/settings.py:1475
msgid ""
"If turned off, ticket downloads are only possible after an order has been "
"marked as paid."
msgstr ""
msgstr "如果關閉,則只有在訂單標記為已付款後,才能下載門票。"
#: pretix/base/settings.py:1486
msgid "Do not issue ticket before email address is validated"
msgstr ""
msgstr "在驗證電子郵件位址前,不要產生票證"
#: pretix/base/settings.py:1487
msgid ""
@@ -8521,7 +8523,7 @@ msgstr ""
#: pretix/base/settings.py:1503
msgid "Low availability threshold"
msgstr ""
msgstr "可用性門檻低"
#: pretix/base/settings.py:1504
msgid ""
@@ -8535,7 +8537,7 @@ msgstr ""
#: pretix/base/settings.py:1518
msgid "Show availability in event overviews"
msgstr ""
msgstr "在活動概覽中顯示可用性"
#: pretix/base/settings.py:1519
msgid ""
@@ -8561,35 +8563,35 @@ msgstr "月日曆"
#: pretix/base/settings.py:1538
msgid "Default overview style"
msgstr ""
msgstr "預設值概覽樣式"
#: pretix/base/settings.py:1544
msgid ""
"If your event series has more than 50 dates in the future, only the month or "
"week calendar can be used."
msgstr ""
msgstr "如果你的事件系列在未來的日期超過 50則那只能使用月曆或周曆。"
#: pretix/base/settings.py:1553
msgid "Hide all unavailable dates from calendar or list views"
msgstr ""
msgstr "從日曆或列表檢視中隱藏所有不可用的日期"
#: pretix/base/settings.py:1554 pretix/base/settings.py:1565
msgid ""
"This option currently only affects the calendar of this event series, not "
"the organizer-wide calendar."
msgstr ""
msgstr "此當前選項只影響此事件系列的日曆,而不會影響召集人範圍的日曆。"
#: pretix/base/settings.py:1564
msgid "Hide all past dates from calendar"
msgstr ""
msgstr "從日曆中隱藏所有過去的日期"
#: pretix/base/settings.py:1575
msgid "Allow customers to modify their information after they checked in."
msgstr ""
msgstr "允許客戶在辦理登機手續後修改其資訊。"
#: pretix/base/settings.py:1584
msgid "Last date of modifications"
msgstr ""
msgstr "最後修改日期"
#: pretix/base/settings.py:1585
msgid ""
@@ -8603,43 +8605,43 @@ msgstr ""
#: pretix/base/settings.py:1596
msgid "Customers can change the variation of the products they purchased"
msgstr ""
msgstr "客戶可以更改他們購買的產品的類別"
#: pretix/base/settings.py:1605
msgid "Customers can change their selected add-on products"
msgstr ""
msgstr "客戶可以更改其所選的附加產品"
#: pretix/base/settings.py:1615 pretix/base/settings.py:1624
msgid ""
"Only allow changes if the resulting price is higher or equal than the "
"previous price."
msgstr ""
msgstr "只當成最後價格高於或等於上一項價格時,才允許更改。"
#: pretix/base/settings.py:1616 pretix/base/settings.py:1625
msgid ""
"Only allow changes if the resulting price is higher than the previous price."
msgstr ""
msgstr "僅當最後價格高於之前的價格時,才允許更改。"
#: pretix/base/settings.py:1617 pretix/base/settings.py:1626
msgid ""
"Only allow changes if the resulting price is equal to the previous price."
msgstr ""
msgstr "只有當最後價格等於之前的價格時,才允許更改。"
#: pretix/base/settings.py:1618 pretix/base/settings.py:1627
msgid "Allow changes regardless of price, even if this results in a refund."
msgstr ""
msgstr "允許更改,無論價格如何,即使這會導致退款。"
#: pretix/base/settings.py:1622
msgid "Requirement for changed prices"
msgstr ""
msgstr "更改價格的要求"
#: pretix/base/settings.py:1638
msgid "Do not allow changes after"
msgstr ""
msgstr "不允許在事後進行更改"
#: pretix/base/settings.py:1647
msgid "Allow change even though the ticket has already been checked in"
msgstr ""
msgstr "即使機票已登記,也允許更改"
#: pretix/base/settings.py:1648
msgid ""
@@ -8655,7 +8657,7 @@ msgstr ""
#: pretix/base/settings.py:1660
msgid "Allow individual attendees to change their ticket"
msgstr ""
msgstr "允許個人出席者更改其門票"
#: pretix/base/settings.py:1661
msgid ""
@@ -8671,11 +8673,11 @@ msgstr ""
#: pretix/base/settings.py:1673
msgid "Customers can cancel their unpaid orders"
msgstr ""
msgstr "客戶可以取消未付款的訂單"
#: pretix/base/settings.py:1685
msgid "Charge a fixed cancellation fee"
msgstr ""
msgstr "收取固定取消費用"
#: pretix/base/settings.py:1686 pretix/base/settings.py:1697
#: pretix/base/settings.py:1711
@@ -8689,57 +8691,58 @@ msgstr ""
#: pretix/base/settings.py:1696
msgid "Charge payment, shipping and service fees"
msgstr ""
msgstr "收取付款、運費和服務費"
#: pretix/base/settings.py:1710
msgid "Charge a percentual cancellation fee"
msgstr ""
msgstr "收取百分比取消費用"
#: pretix/base/settings.py:1721 pretix/base/settings.py:1860
msgid "Do not allow cancellations after"
msgstr ""
msgstr "不允許事後取消"
#: pretix/base/settings.py:1730
msgid "Customers can cancel their paid orders"
msgstr ""
msgstr "客戶可以取消已付的訂單"
#: pretix/base/settings.py:1731
msgid ""
"Paid money will be automatically paid back if the payment method allows it. "
"Otherwise, a manual refund will be created for you to process manually."
msgstr ""
msgstr "如果付款方式允許,已支付的款項將自動退還。否則,我們將建立手動退款,供你手動"
"處理。"
#: pretix/base/settings.py:1744 pretix/control/forms/orders.py:822
msgid "Keep a fixed cancellation fee"
msgstr ""
msgstr "保留固定的取消費用"
#: pretix/base/settings.py:1753
msgid "Keep payment, shipping and service fees"
msgstr ""
msgstr "保留付款、運費和服務費"
#: pretix/base/settings.py:1765 pretix/control/forms/orders.py:833
msgid "Keep a percentual cancellation fee"
msgstr ""
msgstr "保留百分比取消費用"
#: pretix/base/settings.py:1774
msgid "Allow customers to voluntarily choose a lower refund"
msgstr ""
msgstr "允許客戶自願選擇較低的退款"
#: pretix/base/settings.py:1775
msgid ""
"With this option enabled, your customers can choose to get a smaller refund "
"to support you."
msgstr ""
msgstr "啟用此選項後,你的客戶可以選擇,拿更少的退款來幫助你。"
#: pretix/base/settings.py:1780
msgid ""
"However, if you want us to help keep the lights on here, please consider "
"using the slider below to request a smaller refund. Thank you!"
msgstr ""
msgstr "但是,如果你希望我們繼續營運,請考慮使用下面的滑動條申請較少的退款。謝謝!"
#: pretix/base/settings.py:1787
msgid "Voluntary lower refund explanation"
msgstr ""
msgstr "自願退款說明"
#: pretix/base/settings.py:1790
msgid ""
@@ -8753,42 +8756,43 @@ msgstr ""
#: pretix/base/settings.py:1805
msgid "Step size for reduction amount"
msgstr ""
msgstr "減少步長"
#: pretix/base/settings.py:1806
msgid ""
"By default, customers can choose an arbitrary amount for you to keep. If you "
"set this to e.g. 10, they will only be able to choose values in increments "
"of 10."
msgstr ""
msgstr "預設值情況下,客戶可以選擇任意金額讓你保留。如果你將其設定為例如 10"
"客戶只能以 10 為增量的選擇值。"
#: pretix/base/settings.py:1816
msgid ""
"Customers can only request a cancellation that needs to be approved by the "
"event organizer before the order is canceled and a refund is issued."
msgstr ""
msgstr "客戶只能在取消訂單及退款前,請求取消需要活動召集人批准。"
#: pretix/base/settings.py:1826
msgid ""
"Do not show the cancellation fee to users when they request cancellation."
msgstr ""
msgstr "當使用者請求取消時,請勿向使用者顯示其取消費用。"
#: pretix/base/settings.py:1835 pretix/base/settings.py:1845
msgid "All refunds are issued to the original payment method"
msgstr ""
msgstr "所有退款均以原始付款方式退還"
#: pretix/base/settings.py:1836 pretix/base/settings.py:1846
msgid ""
"Customers can choose between a gift card and a refund to their payment method"
msgstr ""
msgstr "客戶可以選擇禮品卡或退款為他們的支付方式"
#: pretix/base/settings.py:1837 pretix/base/settings.py:1847
msgid "All refunds are issued as gift cards"
msgstr ""
msgstr "所有退款均以禮品卡形式退還"
#: pretix/base/settings.py:1838 pretix/base/settings.py:1848
msgid "Do not handle refunds automatically at all"
msgstr ""
msgstr "全然不自動處理退款"
#: pretix/base/settings.py:1843
#: pretix/control/templates/pretixcontrol/order/index.html:141
@@ -8801,7 +8805,7 @@ msgstr "聯絡地址"
#: pretix/base/settings.py:1870 pretix/control/forms/event.py:1577
msgid "We'll show this publicly to allow attendees to contact you."
msgstr ""
msgstr "我們將公開顯示此資訊,以便出席者與你聯繫。"
#: pretix/base/settings.py:1878 pretix/control/forms/event.py:1569
msgid "Imprint URL"
@@ -8811,44 +8815,44 @@ msgstr "版本說明網址"
msgid ""
"This should point e.g. to a part of your website that has your contact "
"details and legal information."
msgstr ""
msgstr "例如,這應該導向你網站上,包括你部分的聯絡方式及法律資訊的。"
#: pretix/base/settings.py:1889
msgid "Privacy Policy URL"
msgstr ""
msgstr "隱私政策網址"
#: pretix/base/settings.py:1890
msgid ""
"This should point e.g. to a part of your website that explains how you use "
"data gathered in your ticket shop."
msgstr ""
msgstr "例如,這應該導向你網站的一部分,該部分解釋了你如何使用在售票處收集的數據。"
#: pretix/base/settings.py:1912
msgid "Attach ticket files"
msgstr ""
msgstr "附加票證檔"
#: pretix/base/settings.py:1914
#, python-brace-format
msgid ""
"Tickets will never be attached if they're larger than {size} to avoid email "
"delivery problems."
msgstr ""
msgstr "如果票證大於 {size},則永遠不會附加票證,以避免電子郵件傳送問題。"
#: pretix/base/settings.py:1925 pretix/plugins/sendmail/forms.py:222
#: pretix/plugins/sendmail/models.py:215
#: pretix/plugins/sendmail/templates/pretixplugins/sendmail/send_form.html:66
msgid "Attach calendar files"
msgstr ""
msgstr "附加日曆檔"
#: pretix/base/settings.py:1926
msgid ""
"If enabled, we will attach an .ics calendar file to order confirmation "
"emails."
msgstr ""
msgstr "如果啟用,我們將在訂單中確認電子郵件附加的一項.ics日曆檔。"
#: pretix/base/settings.py:1935
msgid "Attach calendar files only after order has been paid"
msgstr ""
msgstr "只有在訂單付款後附加日曆檔"
#: pretix/base/settings.py:1936
msgid ""
@@ -8883,7 +8887,8 @@ msgstr "主題前綴"
msgid ""
"This will be prepended to the subject of all outgoing emails, formatted as "
"[prefix]. Choose, for example, a short form of your event name."
msgstr ""
msgstr "這將附加到所有傳出電子郵件的主題前面,格式為 "
"[前綴]。例如,選擇事件名稱的縮寫形式。"
#: pretix/base/settings.py:1976 pretix/control/forms/mailsetup.py:35
#: pretix/control/forms/mailsetup.py:108
@@ -8895,7 +8900,7 @@ msgstr "寄件者位址"
#: pretix/base/settings.py:1977 pretix/control/forms/mailsetup.py:36
#: pretix/control/forms/mailsetup.py:109
msgid "Sender address for outgoing emails"
msgstr ""
msgstr "傳出電子郵件的寄件者位址"
#: pretix/base/settings.py:1986
msgid "Sender name"
@@ -8905,20 +8910,20 @@ msgstr "寄件者姓名"
msgid ""
"Sender name used in conjunction with the sender address for outgoing emails. "
"Defaults to your event name."
msgstr ""
msgstr "與傳出電子郵件的寄件者位址一起使用的寄件者姓名。預設值為事件名稱。"
#: pretix/base/settings.py:2005 pretix/base/settings.py:2062
#: pretix/base/settings.py:2079 pretix/base/settings.py:2097
#, python-brace-format
msgid "Your order: {code}"
msgstr ""
msgstr "你的訂單: {code}"
#: pretix/base/settings.py:2009 pretix/base/settings.py:2042
#: pretix/base/settings.py:2144 pretix/base/settings.py:2359
#: pretix/base/settings.py:2396
#, python-brace-format
msgid "Your event registration: {code}"
msgstr ""
msgstr "你的活動註冊:{code}"
#: pretix/base/settings.py:2013
#, python-brace-format
@@ -18780,15 +18785,13 @@ msgid "Mark as done"
msgstr ""
#: pretix/control/templates/pretixcontrol/order/refund_process.html:22
#, fuzzy, python-format
#, python-format
msgid ""
"We received notice that <strong>%(amount)s</strong> have been refunded via "
"<strong>%(method)s</strong>. If this refund is processed, the order will be "
"underpaid by <strong>%(pending)s</strong>. The order total is "
"<strong>%(total)s</strong>."
msgstr ""
"我們收到通知, <strong>%(amount)s</strong> 退款。如果處理此退款,訂單將少付 "
"<strong>%(pending)s</strong>。訂單總數為 <strong>%(total)s</strong>"
#: pretix/control/templates/pretixcontrol/order/refund_process.html:30
msgid "Since the order is already canceled, this will not affect its state."

View File

@@ -514,7 +514,6 @@ class AddOnsStep(CartMixin, AsyncAction, TemplateFlowStep):
'variation': cartpos.variation,
'categories': []
}
formset.append(formsetentry)
current_addon_products = defaultdict(list)
for a in cartpos.addons.all():
@@ -592,6 +591,8 @@ class AddOnsStep(CartMixin, AsyncAction, TemplateFlowStep):
'iao': iao,
'items': items
})
if formsetentry['categories']:
formset.append(formsetentry)
return formset
def get_context_data(self, **kwargs):

View File

@@ -26,6 +26,11 @@
</summary>
<div id="cp{{ form.pos.pk }}">
<div class="panel-body">
{% if form.pos.seat %}
<p>
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="16" height="14" viewBox="2 0 16 14"><path d="M7.713 3.573c-.787-.124-1.677.472-1.511 1.529l.857 3.473c.116.579.578 1.086 1.317 1.086h3.166v3.504c0 1.108 1.556 1.113 1.556.019V8.682c0-.536-.376-1.116-1.099-1.116L9.52 7.563l-.752-2.936c-.147-.648-.583-.981-1.055-1.055v.001Z"/><path d="M4.48 5.835a.6.6 0 0 0-.674.725l.71 3.441c.287 1.284 1.39 2.114 2.495 2.114h2.273c.807 0 .811-1.215-.01-1.215H7.188c-.753 0-1.375-.45-1.563-1.289l-.672-3.293c-.062-.3-.26-.452-.474-.483ZM7.433.102a1.468 1.468 0 1 0 0 2.937 1.469 1.469 0 1 0 0-2.937Z"/></svg>{{ form.pos.seat }}
</p>
{% endif %}
{% if form.pos.subevent %}
<p>
<span class="fa fa-calendar" aria-hidden="true"></span>

View File

@@ -335,7 +335,7 @@
id="cp_{{ form.pos.pk }}_item_{{ item.id }}"
aria-label="{% blocktrans with item=item.name %}Quantity of {{ item }} to order{% endblocktrans %}"
{% if item.description %} aria-describedby="cp-{{ form.pos.pk }}-item-{{ item.id }}-description"{% endif %}>
<button type="button" data-step="1" data-controls="cp_{{ form.pos.pk }}_item_{{ item.id }}" class="btn btn-default input-item-count-dec" aria-label="{% trans "Increase quantity" %}">+</button>
<button type="button" data-step="1" data-controls="cp_{{ form.pos.pk }}_item_{{ item.id }}" class="btn btn-default input-item-count-inc" aria-label="{% trans "Increase quantity" %}">+</button>
</div>
{% endif %}
</div>

File diff suppressed because it is too large Load Diff

View File

@@ -4,10 +4,10 @@
"private": true,
"scripts": {},
"dependencies": {
"@babel/core": "^7.21.5",
"@babel/preset-env": "^7.21.5",
"@babel/core": "^7.22.1",
"@babel/preset-env": "^7.22.4",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-node-resolve": "^15.1.0",
"vue": "^2.7.14",
"rollup": "^2.79.1",
"rollup-plugin-vue": "^5.0.1",

View File

@@ -69,6 +69,14 @@ a.btn, button.btn {
-webkit-appearance: none;
margin: 0;
}
.input-item-count-dec[disabled],
.input-item-count-inc[disabled],
.input-item-count-dec[disabled]:hover,
.input-item-count-inc[disabled]:hover {
box-shadow: 0px 0px 0px 1px #cccccc inset;
background: #eee;
opacity: 1;
}
.input-item-count-dec {
border-top-right-radius: 0;
border-bottom-right-radius: 0;

View File

@@ -72,6 +72,21 @@ def test_initialize_used_token(client, device: Device):
assert resp.data == {'token': ['This initialization token has already been used.']}
@pytest.mark.django_db
def test_initialize_revoked_token(client, new_device: Device):
new_device.revoked = True
new_device.save()
resp = client.post('/api/v1/device/initialize', {
'token': new_device.initialization_token,
'hardware_brand': 'Samsung',
'hardware_model': 'Galaxy S',
'software_brand': 'pretixdroid',
'software_version': '4.0.0'
})
assert resp.status_code == 400
assert resp.data == {'token': ['This initialization token has been revoked.']}
@pytest.mark.django_db
def test_initialize_valid_token(client, new_device: Device):
resp = client.post('/api/v1/device/initialize', {

View File

@@ -2002,3 +2002,32 @@ def test_order_change_invalid_input(token_client, organizer, event, order, quota
)
assert 'twice' in str(resp.data)
assert resp.status_code == 400
@pytest.mark.django_db
def test_order_change_create_addon(token_client, organizer, event, order, quota, item):
with scopes_disabled():
cat = event.categories.create(name="Workshops")
item2 = event.items.create(name="WS1", default_price=23, category=cat)
quota.items.add(item2)
item.addons.create(addon_category=cat)
assert order.positions.count() == 1
payload = {
'create_positions': [
{
'item': item2.pk,
'addon_to': 1,
},
],
}
resp = token_client.post(
'/api/v1/organizers/{}/events/{}/orders/{}/change/'.format(
organizer.slug, event.slug, order.code,
), format='json', data=payload
)
assert resp.status_code == 200
with scopes_disabled():
assert order.positions.count() == 2
op = order.positions.last()
assert op.positionid == 3
assert op.addon_to.positionid == 1

View File

@@ -110,6 +110,17 @@ def test_revoke_device(event, admin_user, admin_team, device, client):
assert device.revoked
@pytest.mark.django_db
def test_revoke_device_before_initialization(event, admin_user, admin_team, device, client):
client.login(email='dummy@dummy.dummy', password='dummy')
device.save()
client.get('/control/organizer/dummy/device/{}/revoke'.format(device.pk))
client.post('/control/organizer/dummy/device/{}/revoke'.format(device.pk), {}, follow=True)
device.refresh_from_db()
assert device.revoked
@pytest.mark.django_db
def test_bulk_update_device(event, admin_user, admin_team, device, client):
client.login(email='dummy@dummy.dummy', password='dummy')

View File

@@ -215,13 +215,13 @@ EXPECTED = [
'payer': 'MUELLER',
'iban': '234567',
'bic': '10020030',
'reference': 'NONREF//55555\nMiete November'},
'reference': 'NONREF\n55555\nMiete November'},
{'amount': '3000.00',
'date': '2002-11-02',
'payer': 'MUELLER',
'iban': '0847564700',
'bic': '50060400',
'reference': 'NONREF//55555\nGehalt OktoberFirma Mustermann GmbH'},
'reference': 'NONREF\n55555\nGehalt OktoberFirma Mustermann GmbH'},
],
[
{'amount': '-400.62',
@@ -245,7 +245,7 @@ EXPECTED = [
'payer': 'PETER PETERSEN',
'iban': '5555555555',
'bic': '50050050',
'reference': 'NONREF//00000000\nRECHNUNG 20120165PETER PETERSEN\n0001'}
'reference': 'NONREF\n000000000001\nRECHNUNG 20120165PETER PETERSEN'}
],
[
{'amount': '5000.00', 'date': '2002-03-17',