A11y improvements (#2081)

Co-authored-by: Raphael Michel <michel@rami.io>
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
This commit is contained in:
Richard Schreiber
2021-10-17 16:56:16 +02:00
committed by GitHub
parent cc13ca1c3f
commit 3dcfa57b70
61 changed files with 1505 additions and 990 deletions

View File

@@ -52,7 +52,7 @@ from django.core.exceptions import ValidationError
from django.core.files.uploadedfile import SimpleUploadedFile
from django.core.validators import MaxValueValidator, MinValueValidator
from django.db.models import QuerySet
from django.forms import Select
from django.forms import Select, widgets
from django.utils import translation
from django.utils.formats import date_format
from django.utils.html import escape
@@ -154,8 +154,9 @@ class NamePartsWidget(forms.MultiWidget):
final_attrs,
id='%s_%s' % (id_, i),
title=self.scheme['fields'][i][1],
placeholder=self.scheme['fields'][i][1],
)
if not isinstance(widget, widgets.Select):
these_attrs['placeholder'] = self.scheme['fields'][i][1]
if self.scheme['fields'][i][0] in REQUIRED_NAME_PARTS:
if self.field.required:
these_attrs['required'] = 'required'

View File

@@ -57,6 +57,7 @@ from django.urls import reverse
from django.utils.crypto import get_random_string
from django.utils.formats import date_format
from django.utils.functional import cached_property
from django.utils.html import format_html
from django.utils.timezone import make_aware, now
from django.utils.translation import gettext, gettext_lazy as _
from django_scopes import ScopedManager, scopes_disabled
@@ -145,7 +146,7 @@ class EventMixin:
("SHORT_" if short else "") + ("DATETIME_FORMAT" if self.settings.show_times and show_times else "DATE_FORMAT")
)
def get_date_range_display(self, tz=None, force_show_end=False) -> str:
def get_date_range_display(self, tz=None, force_show_end=False, as_html=False) -> str:
"""
Returns a formatted string containing the start date and the end date
of the event with respect to the current locale and to the ``show_date_to``
@@ -153,8 +154,17 @@ class EventMixin:
"""
tz = tz or self.timezone
if (not self.settings.show_date_to and not force_show_end) or not self.date_to:
if as_html:
return format_html(
"<time datetime=\"{}\">{}</time>",
_date(self.date_from.astimezone(tz), "Y-m-d"),
_date(self.date_from.astimezone(tz), "DATE_FORMAT"),
)
return _date(self.date_from.astimezone(tz), "DATE_FORMAT")
return daterange(self.date_from.astimezone(tz), self.date_to.astimezone(tz))
return daterange(self.date_from.astimezone(tz), self.date_to.astimezone(tz), as_html)
def get_date_range_display_as_html(self, tz=None, force_show_end=False) -> str:
return self.get_date_range_display(tz, force_show_end, as_html=True)
def get_time_range_display(self, tz=None, force_show_end=False) -> str:
"""

View File

@@ -33,36 +33,67 @@
# License for the specific language governing permissions and limitations under the License.
from django.template.defaultfilters import date as _date
from django.utils.html import format_html
from django.utils.translation import get_language, gettext_lazy as _
def daterange(df, dt):
def daterange(df, dt, as_html=False):
lng = get_language()
if df.year == dt.year and df.month == dt.month and df.day == dt.day:
if as_html:
base_format = format_html("<time datetime=\"{}\">{{}}</time>", _date(df, "Y-m-d"))
else:
base_format = "{}"
else:
if as_html:
base_format = format_html("<time datetime=\"{}\">{{}}</time>{{}}<time datetime=\"{}\">{{}}</time>", _date(df, "Y-m-d"), _date(dt, "Y-m-d"))
else:
base_format = "{}{}{}"
if lng.startswith("de"):
if df.year == dt.year and df.month == dt.month and df.day == dt.day:
return "{}".format(_date(df, "j. F Y"))
return format_html(base_format, _date(df, "j. F Y"))
elif df.year == dt.year and df.month == dt.month:
return "{}.{}".format(_date(df, "j"), _date(dt, "j. F Y"))
return format_html(base_format, _date(df, "j."), "", _date(dt, "j. F Y"))
elif df.year == dt.year:
return "{} {}".format(_date(df, "j. F"), _date(dt, "j. F Y"))
return format_html(base_format, _date(df, "j. F"), " ", _date(dt, "j. F Y"))
elif lng.startswith("en"):
if df.year == dt.year and df.month == dt.month and df.day == dt.day:
return "{}".format(_date(df, "N jS, Y"))
return format_html(base_format, _date(df, "N jS, Y"))
elif df.year == dt.year and df.month == dt.month:
return "{} {}".format(_date(df, "N jS"), _date(dt, "jS, Y"))
return format_html(base_format, _date(df, "N jS"), " ", _date(dt, "jS, Y"))
elif df.year == dt.year:
return "{} {}".format(_date(df, "N jS"), _date(dt, "N jS, Y"))
return format_html(base_format, _date(df, "N jS"), " ", _date(dt, "N jS, Y"))
elif lng.startswith("es"):
if df.year == dt.year and df.month == dt.month and df.day == dt.day:
return "{}".format(_date(df, "DATE_FORMAT"))
return format_html(base_format, _date(df, "DATE_FORMAT"))
elif df.year == dt.year and df.month == dt.month:
return "{} - {} de {} de {}".format(_date(df, "j"), _date(dt, "j"), _date(dt, "F"), _date(dt, "Y"))
return format_html(
base_format,
_date(df, "j"),
" - ",
"{} de {} de {}".format(_date(dt, "j"), _date(dt, "F"), _date(dt, "Y"))
)
elif df.year == dt.year:
return "{} de {} - {} de {} de {}".format(_date(df, "j"), _date(df, "F"), _date(dt, "j"), _date(dt, "F"), _date(dt, "Y"))
return format_html(
base_format,
"{} de {}".format(_date(df, "j"), _date(df, "F")),
" - ",
"{} de {} de {}".format(_date(dt, "j"), _date(dt, "F"), _date(dt, "Y"))
)
if df.year == dt.year and df.month == dt.month and df.day == dt.day:
return _date(df, "DATE_FORMAT")
return format_html(base_format, _date(df, "DATE_FORMAT"))
if as_html:
base_format = "<time datetime=\"{}\">{}</time>"
return format_html(
"{date_from} {date_to}",
date_from=format_html(base_format, _date(df, "Y-m-d"), _date(df, "DATE_FORMAT")),
date_to=format_html(base_format, _date(dt, "Y-m-d"), _date(dt, "DATE_FORMAT")),
)
return _("{date_from} {date_to}").format(
date_from=_date(df, "DATE_FORMAT"), date_to=_date(dt, "DATE_FORMAT")
date_from=_date(df, "DATE_FORMAT"),
date_to=_date(dt, "DATE_FORMAT"),
)

View File

@@ -24638,7 +24638,7 @@ msgstr "Ihre Bestellung war erfolgreich! Sie finden weiter unten alle Details."
#: pretix/presale/templates/pretixpresale/event/order.html:18
#: pretix/presale/templates/pretixpresale/event/order.html:50
msgid "We successfully received your payment. See below for details."
msgstr "Wir haben Ihre Zahlung erfolgreich erhalten. Vielen Dank!"
msgstr "Wir haben Ihre Zahlung erfolgreich erhalten."
#: pretix/presale/templates/pretixpresale/event/order.html:35
msgid ""

View File

@@ -24593,7 +24593,7 @@ msgstr ""
#: pretix/presale/templates/pretixpresale/event/order.html:18
#: pretix/presale/templates/pretixpresale/event/order.html:50
msgid "We successfully received your payment. See below for details."
msgstr "Wir haben deine Zahlung erfolgreich erhalten. Vielen Dank!"
msgstr "Wir haben deine Zahlung erfolgreich erhalten."
#: pretix/presale/templates/pretixpresale/event/order.html:35
msgid ""

View File

@@ -6,21 +6,26 @@
bank account, using a personal reference code:
{% endblocktrans %}</p>
<address>
{% if settings.bank_details_type == "sepa" %}
{% trans "Account holder" %}: {{ settings.bank_details_sepa_name }}<br>
{% trans "IBAN" %}: {{ settings.bank_details_sepa_iban|ibanformat }}<br>
{% trans "BIC" %}: {{ settings.bank_details_sepa_bic }}<br>
{% trans "Bank" %}: {{ settings.bank_details_sepa_bank }}<br>
{% endif %}
{% if details %}
{{ details|linebreaksbr }}<br>
{% endif %}
{% if code %}
<strong>{% trans "Reference code (important):" %} {{ code }}</strong>
{% else %}
{% if settings.bank_details_type == "sepa" %}
<dl class="dl-horizontal">
<dt>{% trans "Account holder" %}: </dt><dd>{{ settings.bank_details_sepa_name }}</dd>
<dt>{% trans "IBAN" %}: </dt><dd>{{ settings.bank_details_sepa_iban|ibanformat }}</dd>
<dt>{% trans "BIC" %}: </dt><dd>{{ settings.bank_details_sepa_bic }}</dd>
<dt>{% trans "Bank" %}: </dt><dd>{{ settings.bank_details_sepa_bank }}</dd>
</dl>
{% endif %}
{% if details %}
{{ details|linebreaks }}
{% endif %}
{% if code %}
<dl class="dl-horizontal">
<dt>{% trans "Reference code (important):" %} </dt><dd><strong>{{ code }}</strong></dd>
</dl>
{% else %}
<p>
<strong>
{% trans "We will assign you a personal reference code to use after you completed the order." %}
</strong>
{% endif %}
</address>
</p>
{% endif %}

View File

@@ -16,34 +16,43 @@
<div class="row">
<div class="{% if settings.bank_details_type == "sepa" %}col-md-6{% else %}col-md-12{% endif %} col-xs-12">
<p>
{% if settings.bank_details_type == "sepa" %}
<strong>{% trans "Account holder" %}:</strong> {{ settings.bank_details_sepa_name }}<br>
<strong>{% trans "IBAN" %}:</strong> {{ settings.bank_details_sepa_iban|ibanformat }}<br>
<strong>{% trans "BIC" %}:</strong> {{ settings.bank_details_sepa_bic }}<br>
<strong>{% trans "Bank" %}:</strong> {{ settings.bank_details_sepa_bank }}<br>
<dl class="dl-horizontal">
<dt>{% trans "Account holder" %}:</dt><dd>{{ settings.bank_details_sepa_name }}</dt>
<dt>{% trans "IBAN" %}:</dt><dd>{{ settings.bank_details_sepa_iban|ibanformat }}</dt>
<dt>{% trans "BIC" %}:</dt><dd>{{ settings.bank_details_sepa_bic }}</dt>
<dt>{% trans "Bank" %}:</dt><dd>{{ settings.bank_details_sepa_bank }}</dt>
{% if details %}
</dl>
{% endif %}
{% endif %}
{% if details %}
{{ details|linebreaksbr }}<br>
{{ details|linebreaks }}
<dl class="dl-horizontal">
{% endif %}
<strong>{% trans "Amount:" %}</strong> {{ amount|money:event.currency }}<br/>
<strong>{% trans "Reference code (important):" %} {{ code }}</strong>
</p>
{% if not settings.bank_details_type == "sepa" and not details %}
<dl class="dl-horizontal">
{% endif %}
<dt>{% trans "Amount:" %}</dt><dd>{{ amount|money:event.currency }}</dd>
<dt>{% trans "Reference code (important):" %}</dt><dd><b>{{ code }}</b></dd>
</dl>
<p>
{% trans "After you sent the bank transfer, you can close this window. We will send you an email as soon as we received your payment." %}
</p>
</div>
{% if settings.bank_details_type == "sepa" %}
<div class="col-md-3 col-sm-6 hidden-xs text-center">
BezahlCode<br>
<a href="bank://singlepaymentsepa?name={{ settings.bank_details_sepa_name|urlencode }}&iban={{ settings.bank_details_sepa_iban }}&bic={{ settings.bank_details_sepa_bic }}&amount={{ amount|commadecimal }}&reason={{ code }}&currency={{ event.currency }}">
<script type="text/plain" data-size="150" data-replace-with-qr>bank://singlepaymentsepa?name={{ settings.bank_details_sepa_name|urlencode }}&iban={{ settings.bank_details_sepa_iban }}&bic={{ settings.bank_details_sepa_bic }}&amount={{ amount|commadecimal }}&reason={{ code }}&currency={{ event.currency }}</script>
<div class="col-md-3 col-sm-6 hidden-xs text-center js-only">
<h4>BezahlCode</h4>
<p>
<a aria-label="{% trans "Open BezahlCode in your banking app to start the payment process." %}" href="bank://singlepaymentsepa?name={{ settings.bank_details_sepa_name|urlencode }}&iban={{ settings.bank_details_sepa_iban }}&bic={{ settings.bank_details_sepa_bic }}&amount={{ amount|commadecimal }}&reason={{ code }}&currency={{ event.currency }}">
<script type="text/plain" data-size="150" data-replace-with-qr data-desc="{% trans 'BezahlCode for your order. Scan this image with your banking apps QR-Reader to start the payment process.' %}">bank://singlepaymentsepa?name={{ settings.bank_details_sepa_name|urlencode }}&iban={{ settings.bank_details_sepa_iban }}&bic={{ settings.bank_details_sepa_bic }}&amount={{ amount|commadecimal }}&reason={{ code }}&currency={{ event.currency }}</script>
</a>
<p>&nbsp;</p>
</p>
</div>
<div class="col-md-3 col-sm-6 hidden-xs text-center">
GiroCode / EPC-QR<br>
<script type="text/plain" data-size="150" data-replace-with-qr>BCD
<div class="col-md-3 col-sm-6 hidden-xs text-center js-only">
<h4>GiroCode / EPC-QR</h4>
<p>
<script type="text/plain" data-size="150" data-replace-with-qr data-desc="{% trans 'GiroCode / EPC-QR for your order. Scan this image with your banking apps QR-Reader to start the payment process.' %}">BCD
002
2
SCT
@@ -56,6 +65,7 @@ SCT
{{ code }}
</script>
</p>
</div>
<div class="visible-xs-block text-center">
<p>

View File

@@ -103,7 +103,11 @@ class CheckoutFieldRenderer(FieldRenderer):
if self.field_help:
help_text_and_errors.append(self.field_help)
for idx, text in enumerate(help_text_and_errors):
html += '<div class="help-block" id="help-for-{id}-{idx}">{text}</div>'.format(id=self.field.id_for_label, text=text, idx=idx)
if text.lower().startswith("<p>") or text.lower().startswith("<p "):
html_tag = "div"
else:
html_tag = "p"
html += '<{tag} class="help-block" id="help-for-{id}-{idx}">{text}</{tag}>'.format(id=self.field.id_for_label, text=text, idx=idx, tag=html_tag)
return html
def add_help_attrs(self, widget=None):

View File

@@ -57,17 +57,17 @@
{% block footer %}
{% endblock %}
<nav aria-label="{% trans "Footer Navigation" %}">
{% block footernav %}
{% endblock %}
{% if footer_text %}
{{ footer_text }}
&middot;
{% endif %}
{% for f in footer %}
<a href="{% safelink f.url %}" target="_blank" rel="noopener">{{ f.label }}</a>
&middot;
{% endfor %}
{% include "pretixpresale/base_footer.html" %} {# removing or hiding this might be in violation of pretix' license #}
<ul>
{% block footernav %}
{% endblock %}
{% if footer_text %}
<li>{{ footer_text }}</li>
{% endif %}
{% for f in footer %}
<li><a href="{% safelink f.url %}" target="_blank" rel="noopener">{{ f.label }}</a></li>
{% endfor %}
{% include "pretixpresale/base_footer.html" %} {# removing or hiding this might be in violation of pretix' license #}
</ul>
</nav>
</footer>
</div>

View File

@@ -1 +1 @@
{{ poweredby }} {# removing or hiding this might be in violation of pretix' license #}
<li>{{ poweredby }}</li> {# removing or hiding this might be in violation of pretix' license #}

View File

@@ -39,10 +39,14 @@
<div class="pull-right header-part flip hidden-print">
{% if event.settings.locales|length > 1 %}
<nav class="locales" aria-label="{% trans "select language" %}">
<ul>
{% for l in languages %}
<a href="{% url "presale:locale.set" %}?locale={{ l.code }}&next={{ request.path }}{% if request.META.QUERY_STRING %}%3F{{ request.META.QUERY_STRING|urlencode }}{% endif %}" class="{% if l.code == request.LANGUAGE_CODE %}active{% endif %}" rel="nofollow" lang="{{ l.code }}" hreflang="{{ l.code }}">
{{ l.name_local }}</a>
<li><a href="{% url "presale:locale.set" %}?locale={{ l.code }}&next={{ request.path }}{% if request.META.QUERY_STRING %}%3F{{ request.META.QUERY_STRING|urlencode }}{% endif %}" class="{% if l.code == request.LANGUAGE_CODE %}active{% endif %}" rel="nofollow" lang="{{ l.code }}" hreflang="{{ l.code }}"
aria-label="{% language l.code %}{% blocktrans trimmed with language=l.name_local %}
Website in {{ language }}
{% endblocktrans %}{% endlanguage %}">{{ l.name_local }}</a></li>
{% endfor %}
</ul>
</nav>
{% endif %}
{% include "pretixpresale/fragment_login_status.html" %}
@@ -66,19 +70,19 @@
<div class="{% if not event_logo or not event_logo_image_large %}pull-left flip{% endif %}">
{% if event_logo and event_logo_image_large %}
<a href="{% eventurl event "presale:event.index" cart_namespace=cart_namespace|default_if_none:"" %}"
title="{{ event.name }}">
<img src="{{ event_logo|thumb:'1170x5000' }}" alt="{{ event.name }}" class="event-logo" />
aria-label="{% trans 'Homepage' %}" title="{% trans 'Homepage' %}">
<img src="{{ event_logo|thumb:'1170x5000' }}" alt="" class="event-logo" />
</a>
{% elif event_logo %}
<a href="{% eventurl event "presale:event.index" cart_namespace=cart_namespace|default_if_none:"" %}"
title="{{ event.name }}">
<img src="{{ event_logo|thumb:'5000x120' }}" alt="{{ event.name }}" class="event-logo" />
aria-label="{% trans 'Homepage' %}" title="{% trans 'Homepage' %}">
<img src="{{ event_logo|thumb:'5000x120' }}" alt="" class="event-logo" />
</a>
{% else %}
<h1>
<a href="{% eventurl event "presale:event.index" cart_namespace=cart_namespace|default_if_none:"" %}">{{ event.name }}</a>
<a href="{% eventurl event "presale:event.index" cart_namespace=cart_namespace|default_if_none:"" %}" aria-label="{% trans 'Homepage' %}">{{ event.name }}</a>
{% if request.event.settings.show_dates_on_frontpage and not event.has_subevents %}
<small>{{ event.get_date_range_display }}</small>
<small>{{ event.get_date_range_display_as_html }}</small>
{% endif %}
</h1>
{% endif %}
@@ -88,10 +92,14 @@
<div class="{% if not event_logo or not event_logo_image_large %}pull-right flip{% endif %} loginbox hidden-print">
{% if event.settings.locales|length > 1 %}
<nav class="locales" aria-label="{% trans "select language" %}">
<ul>
{% for l in languages %}
<a href="{% url "presale:locale.set" %}?locale={{ l.code }}&next={{ request.path }}{% if request.META.QUERY_STRING %}%3F{{ request.META.QUERY_STRING|urlencode }}{% endif %}" class="{% if l.code == request.LANGUAGE_CODE %}active{% endif %}" rel="nofollow">
{{ l.name_local }}</a>
<li><a href="{% url "presale:locale.set" %}?locale={{ l.code }}&next={{ request.path }}{% if request.META.QUERY_STRING %}%3F{{ request.META.QUERY_STRING|urlencode }}{% endif %}" class="{% if l.code == request.LANGUAGE_CODE %}active{% endif %}" rel="nofollow" lang="{{ l.code }}" hreflang="{{ l.code }}"
aria-label="{% language l.code %}{% blocktrans trimmed with language=l.name_local %}
Website in {{ language }}
{% endblocktrans %}{% endlanguage %}">{{ l.name_local }}</a></li>
{% endfor %}
</ul>
</nav>
{% endif %}
{% include "pretixpresale/fragment_login_status.html" %}
@@ -103,22 +111,27 @@
{% if request.event.testmode %}
{% if request.sales_channel.testmode_supported %}
<div class="alert alert-warning">
<strong>
<p><strong><span class="sr-only">{% trans "Warning" context "alert-messages" %}:</span>
{% trans "This ticket shop is currently in test mode. Please do not perform any real purchases as your order might be deleted without notice." %}
</strong>
</strong></p>
</div>
{% else %}
<div class="alert alert-danger">
<strong>
<p><strong><span class="sr-only">{% trans "Warning" context "alert-messages" %}:</span>
{% trans "Orders made through this sales channel cannot be deleted - even if the ticket shop is in test mode!" %}
</strong>
</strong></p>
</div>
{% endif %}
{% endif %}
{% if messages %}
{% for message in messages %}
<div class="alert {{ message.tags }}">
<div class="alert {{ message.tags }}"{% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %} id="error-message"{% endif %}>
<p>
{% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}<span class="sr-only">{% trans "Error" context "alert-messages" %}:</span>{% endif %}
{% if message.level == DEFAULT_MESSAGE_LEVELS.WARNING %}<span class="sr-only">{% trans "Warning" context "alert-messages" %}:</span>{% endif %}
{% if message.level == DEFAULT_MESSAGE_LEVELS.INFO %}<span class="sr-only">{% trans "Information" context "alert-messages" %}:</span>{% endif %}
{{ message }}
</p>
</div>
{% endfor %}
{% endif %}
@@ -139,25 +152,24 @@
{% if request.event.testmode %}
{% if request.sales_channel.testmode_supported %}
<div class="alert alert-testmode alert-warning">
<strong>
<p><strong><span class="sr-only">{% trans "Warning" context "alert-messages" %}:</span>
{% trans "This ticket shop is currently in test mode. Please do not perform any real purchases as your order might be deleted without notice." %}
</strong>
</strong></p>
</div>
{% else %}
<div class="alert alert-testmode alert-danger">
<strong>
<p><strong><span class="sr-only">{% trans "Warning" context "alert-messages" %}:</span>
{% trans "Orders made through this sales channel cannot be deleted - even if the ticket shop is in test mode!" %}
</strong>
</strong></p>
</div>
{% endif %}
{% endif %}
{% endblock %}
{% block footernav %}
{% if request.event.settings.contact_mail %}
<a href="mailto:{{ request.event.settings.contact_mail }}">{% trans "Contact event organizer" %}</a> &middot;
<li><a href="mailto:{{ request.event.settings.contact_mail }}">{% trans "Contact event organizer" %}</a></li>
{% endif %}
{% if request.event.settings.imprint_url %}
<a href="{% safelink request.event.settings.imprint_url %}" target="_blank" rel="noopener">{% trans "Imprint" %}</a>
&middot;
<li><a href="{% safelink request.event.settings.imprint_url %}" target="_blank" rel="noopener">{% trans "Imprint" %}</a></li>
{% endif %}
{% endblock %}

View File

@@ -16,19 +16,20 @@
{% for form in forms %}
<details class="panel panel-default" open>
<summary class="panel-heading">
<h4 class="panel-title">
<h3 class="panel-title">
<span class="sr-only">{% trans "Add-ons:" %}</span>
<strong>{{ form.item.name }}{% if form.variation %}
{{ form.variation }}
{% endif %}</strong>
<i class="fa fa-angle-down collapse-indicator" aria-hidden="true"></i>
</h4>
</h3>
</summary>
<div id="cp{{ form.cartpos.pk }}">
<div class="panel-body">
{% if form.cartpos.subevent %}
<p>
<span class="fa fa-calendar" aria-hidden="true"></span>
{{ form.cartpos.subevent.name }} &middot; {{ form.cartpos.subevent.get_date_range_display }}
{{ form.cartpos.subevent.name }} &middot; {{ form.cartpos.subevent.get_date_range_display_as_html }}
{% if form.cartpos.event.settings.show_times %}
<span class="fa fa-clock-o" aria-hidden="true"></span>
{{ form.cartpos.subevent.date_from|date:"TIME_FORMAT" }}
@@ -41,29 +42,35 @@
{% if c.category.description %}
{{ c.category.description|rich_text }}
{% endif %}
<p>
{% if c.min_count == c.max_count %}
<p>
{% blocktrans trimmed count min_count=c.min_count %}
You need to choose exactly one option from this category.
{% plural %}
You need to choose {{ min_count }} options from this category.
{% endblocktrans %}
</p>
{% elif c.min_count == 0 and c.max_count >= c.items|length and not c.multi_allowed %}
{% elif c.min_count == 0 %}
{% blocktrans trimmed with max_count=c.max_count %}
<p>
{% blocktrans trimmed count max_count=c.max_count %}
You can choose {{ max_count }} option from this category.
{% plural %}
You can choose up to {{ max_count }} options from this category.
{% endblocktrans %}
</p>
{% else %}
<p>
{% blocktrans trimmed with min_count=c.min_count max_count=c.max_count %}
You can choose between {{ min_count }} and {{ max_count }} options from
this category.
{% endblocktrans %}
</p>
{% endif %}
</p>
{% for item in c.items %}
{% if item.has_variations %}
<details class="item-with-variations" {% if event.settings.show_variations_expanded or item.expand %}open{% endif %}>
<summary class="row-fluid product-row headline">
<article aria-labelledby="cp-{{ form.cartpos.pk }}-item-{{ item.pk }}-legend"{% if item.description %} aria-describedby="cp-{{ form.cartpos.pk }}-item-{{ item.pk }}-description"{% endif %} class="item-with-variations{% if event.settings.show_variations_expanded %} details-open{% endif %}" id="item-{{ item.pk }}">
<div class="row-fluid product-row headline">
<div class="col-md-8 col-xs-12">
{% if item.picture %}
<a href="{{ item.picture.url }}" class="productpicture"
@@ -75,13 +82,9 @@
</a>
{% endif %}
<div class="product-description {% if item.picture %}with-picture{% endif %}">
<h4>
<a href="#" data-toggle="variations">
{{ item.name }}
</a>
</h4>
<h4 id="cp-{{ form.cartpos.pk }}-item-{{ item.pk }}-legend">{{ item.name }}</h4>
{% if item.description %}
<div class="product-description">
<div id="cp-{{ form.cartpos.pk }}-item-{{ item.pk }}-description" class="product-description">
{{ item.description|localize|rich_text }}
</div>
{% endif %}
@@ -97,38 +100,45 @@
</div>
</div>
<div class="col-md-2 col-xs-6 price">
<p>
{% if c.price_included %}
<span class="sr-only">{% trans "free" context "price" %}</span>
{% elif item.free_price %}
{% blocktrans trimmed with price=item.min_price|money:event.currency %}
from {{ price }}
{% endblocktrans %}
{% elif item.min_price != item.max_price %}
{{ item.min_price|money:event.currency }} {{ item.max_price|money:event.currency }}
<span class="sr-only">
{% blocktrans trimmed with from_price=item.min_price|money:event.currency to_price=item.max_price|money:event.currency %}
from {{ from_price }} to {{ to_price }}
{% endblocktrans %}
</span>
<span aria-hidden="true">{{ item.min_price|money:event.currency }} {{ item.max_price|money:event.currency }}</span>
{% elif not item.min_price and not item.max_price %}
{% else %}
{{ item.min_price|money:event.currency }}
{% endif %}
</p>
</div>
<div class="col-md-2 col-xs-6 availability-box">
{% if not event.settings.show_variations_expanded %}
<a href="#" data-toggle="variations" class="js-only">
{% trans "Show variants" %}
</a>
<button type="button" data-toggle="variations" class="btn btn-link js-only"
data-label-alt="{% trans "Hide variants" %}"
aria-expanded="false"
aria-label="{% blocktrans trimmed with item=item.name count=item.available_variations|length %}Show {{count}} variants of {{item}}{% endblocktrans %}">
{% trans "Show variants" %}
</button>
{% endif %}
</div>
<div class="clearfix"></div>
</summary>
</div>
<div class="variations {% if not event.settings.show_variations_expanded %}variations-collapsed{% endif %}">
{% for var in item.available_variations %}
<div class="row-fluid product-row variation">
<article aria-labelledby="cp-{{ form.cartpos.pk }}-item-{{ item.pk }}-{{ var.pk }}-legend"{% if var.description %} aria-describedby="cp-{{ form.cartpos.pk }}-item-{{ item.pk }}-{{ var.pk }}-description"{% endif %} class="row-fluid product-row variation">
<div class="col-md-8 col-xs-12">
<h5>
<label for="cp_{{ form.cartpos.pk }}_variation_{{ item.pk }}_{{ var.pk }}">
{{ var }}
</label>
</h5>
<h5 id="cp-{{ form.cartpos.pk }}-item-{{ item.pk }}-{{ var.pk }}-legend">{{ var }}</h5>
{% if var.description %}
<div class="variation-description">
<div id="cp-{{ form.cartpos.pk }}-item-{{ item.pk }}-{{ var.pk }}-description" class="variation-description">
{{ var.description|localize|rich_text }}
</div>
{% endif %}
@@ -139,12 +149,14 @@
<div class="col-md-2 col-xs-6 price">
{% if not c.price_included %}
{% if var.original_price %}
<del><span class="sr-only">{% trans "Orignal price:" %}</span>
{% if event.settings.display_net_prices %}
<del>{{ var.original_price.net|money:event.currency }}</del>
{{ var.original_price.net|money:event.currency }}
{% else %}
<del>{{ var.original_price.gross|money:event.currency }}</del>
{{ var.original_price.gross|money:event.currency }}
{% endif %}
<ins>
</del>
<ins><span class="sr-only">{% trans "New price:" %}</span>
{% endif %}
{% if item.free_price %}
<div class="input-group input-group-price">
@@ -182,6 +194,8 @@
incl. {{ rate }}% {{ name }}
{% endblocktrans %}</small>
{% endif %}
{% else %}
<span class="sr-only">{% trans "free" context "price" %}</span>
{% endif %}
</div>
{% if var.cached_availability.0 == 100 or var.initial %}
@@ -193,27 +207,27 @@
id="cp_{{ form.cartpos.pk }}_variation_{{ item.id }}_{{ var.id }}"
name="cp_{{ form.cartpos.pk }}_variation_{{ item.id }}_{{ var.id }}"
data-exclusive-prefix="cp_{{ form.cartpos.pk }}_variation_{{ item.id }}_"
title="{% blocktrans with item=item.name var=var.name %}Amount of {{ item }} {{ var }} to order{% endblocktrans %}">
aria-label="{% blocktrans with item=item.name var=var %}Add {{ item }}, {{ var }} to cart{% endblocktrans %}">
</label>
{% else %}
<input type="number" class="form-control input-item-count" placeholder="0" min="0"
{% if var.initial %}value="{{ var.initial }}"{% endif %}
max="{{ c.max_count }}"
pattern="\d*"
id="cp_{{ form.cartpos.pk }}_variation_{{ item.id }}_{{ var.id }}"
name="cp_{{ form.cartpos.pk }}_variation_{{ item.id }}_{{ var.id }}">
name="cp_{{ form.cartpos.pk }}_variation_{{ item.id }}_{{ var.id }}"
aria-label="{% blocktrans with item=item.name var=var %}Quantity of {{ item }}, {{ var }} to order{% endblocktrans %}">
{% endif %}
</div>
{% else %}
{% include "pretixpresale/event/fragment_availability.html" with price=var.display_price.gross avail=var.cached_availability.0 event=event item=item var=var %}
{% endif %}
<div class="clearfix"></div>
</div>
</article>
{% endfor %}
</div>
</details>
</article>
{% else %}
<div class="row-fluid product-row simple">
<article aria-labelledby="cp-{{ form.cartpos.pk }}-item-{{ item.pk }}-legend"{% if item.description %} aria-describedby="cp-{{ form.cartpos.pk }}-item-{{ item.pk }}-description"{% endif %} class="row-fluid product-row simple">
<div class="col-md-8 col-xs-12">
{% if item.picture %}
<a href="{{ item.picture.url }}" class="productpicture"
@@ -225,11 +239,9 @@
</a>
{% endif %}
<div class="product-description {% if item.picture %}with-picture{% endif %}">
<h4>
<label for="cp_{{ form.cartpos.pk }}_item_{{ item.id }}">{{ item.name }}</label>
</h4>
<h4 id="cp-{{ form.cartpos.pk }}-item-{{ item.pk }}-legend">{{ item.name }}</h4>
{% if item.description %}
<div class="product-description">
<div id="cp-{{ form.cartpos.pk }}-item-{{ item.pk }}-description" class="product-description">
{{ item.description|localize|rich_text }}
</div>
{% endif %}
@@ -248,14 +260,17 @@
</div>
</div>
<div class="col-md-2 col-xs-6 price">
<p>
{% if not c.price_included %}
{% if item.original_price %}
<del><span class="sr-only">{% trans "Orignal price:" %}</span>
{% if event.settings.display_net_prices %}
<del>{{ item.original_price.net|money:event.currency }}</del>
{{ item.original_price.net|money:event.currency }}
{% else %}
<del>{{ item.original_price.gross|money:event.currency }}</del>
{{ item.original_price.gross|money:event.currency }}
{% endif %}
<ins>
</del>
<ins><span class="sr-only">{% trans "New price:" %}</span>
{% endif %}
{% if item.free_price %}
<div class="input-group input-group-price">
@@ -291,7 +306,10 @@
incl. {{ rate }}% {{ name }}
{% endblocktrans %}</small>
{% endif %}
{% else %}
<span class="sr-only">{% trans "free" context "price" %}</span>
{% endif %}
</p>
</div>
{% if item.cached_availability.0 == 100 or item.initial %}
<div class="col-md-2 col-xs-6 availability-box available">
@@ -300,23 +318,25 @@
<input type="checkbox" value="1"
{% if item.initial %}checked="checked"{% endif %}
name="cp_{{ form.cartpos.pk }}_item_{{ item.id }}"
id="cp_{{ form.cartpos.pk }}_item_{{ item.id }}">
id="cp_{{ form.cartpos.pk }}_item_{{ item.id }}"
aria-label="{% blocktrans with item=item.name %}Add {{ item }} to cart{% endblocktrans %}"
{% if item.description %} aria-describedby="cp-{{ form.cartpos.pk }}-item-{{ item.id }}-description"{% endif %}>
</label>
{% else %}
<input type="number" class="form-control input-item-count" placeholder="0" min="0"
pattern="\d*"
max="{{ c.max_count }}"
{% if item.initial %}value="{{ item.initial }}"{% endif %}
name="cp_{{ form.cartpos.pk }}_item_{{ item.id }}"
id="cp_{{ form.cartpos.pk }}_item_{{ item.id }}"
title="{% blocktrans with item=item.name %}Amount of {{ item }} to order{% endblocktrans %}">
aria-label="{% blocktrans with item=item.name %}Quantity of {{ item }} to order{% endblocktrans %}"
{% if item.description %} aria-describedby="cp-{{ form.cartpos.pk }}-item-{{ item.id }}-description"{% endif %}>
{% endif %}
</div>
{% else %}
{% include "pretixpresale/event/fragment_availability.html" with price=item.display_price.gross avail=item.cached_availability.0 event=event item=item var=0 %}
{% endif %}
<div class="clearfix"></div>
</div>
</article>
{% endif %}
{% endfor %}
</fieldset>

View File

@@ -15,12 +15,12 @@
<aside aria-label="{% trans "Your cart" %}">
<details class="panel panel-default cart" {% if "open_cart" in request.GET %}open{% endif %}>
<summary class="panel-heading">
<h3 class="panel-title">
<h2 class="panel-title">
<span>
<i class="fa fa-shopping-cart" aria-hidden="true"></i>
<strong>{% trans "Your cart" %}</strong>
</span>
<span>
<span aria-hidden="true">
<strong id="cart-deadline-short" data-expires="{{ cart.first_expiry|date:"Y-m-d H:i:sO" }}">
{% if cart.minutes_left > 0 or cart.seconds_left > 0 %}
{{ cart.minutes_left|stringformat:"02d" }}:{{ cart.seconds_left|stringformat:"02d" }}
@@ -30,20 +30,11 @@
</strong>
<i class="fa fa-angle-down collapse-indicator" aria-hidden="true"></i>
</span>
</h3>
</h2>
</summary>
<div>
<div class="panel-body">
{% include "pretixpresale/event/fragment_cart.html" with cart=cart event=request.event %}
<em id="cart-deadline" data-expires="{{ cart.first_expiry|date:"Y-m-d H:i:sO" }}">
{% if cart.minutes_left > 0 or cart.seconds_left > 0 %}
{% blocktrans trimmed with minutes=cart.minutes_left %}
The items in your cart are reserved for you for {{ minutes }} minutes.
{% endblocktrans %}
{% else %}
{% trans "The items in your cart are no longer reserved for you." %}
{% endif %}
</em>
</div>
</div>
</details>

View File

@@ -36,20 +36,6 @@
</div>
<div class="panel-body">
{% include "pretixpresale/event/fragment_cart.html" with cart=cart event=request.event editable=False %}
<div class="cart-row row">
<div class="col-md-6 col-xs-12">
<em id="cart-deadline" data-expires="{{ cart.first_expiry|date:"Y-m-d H:i:sO" }}">
{% if cart.minutes_left > 0 or cart.seconds_left > 0 %}
{% blocktrans trimmed with minutes=cart.minutes_left %}
The items in your cart are reserved for you for {{ minutes }} minutes.
{% endblocktrans %}
{% else %}
{% trans "The items in your cart are no longer reserved for you." %}
{% endif %}
</em>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
{% if payment_provider %}
@@ -173,17 +159,17 @@
</div>
</div>
{% if confirm_messages %}
<div class="panel panel-primary panel-confirm">
<div class="panel panel-primary panel-confirm" role="group" aria-labelledby="confirm_heading">
<div class="panel-heading">
<h3 class="panel-title">
<h3 class="panel-title" id="confirm_heading">
{% trans "Confirmations" %}
</h3>
</div>
<div class="panel-body">
{% for key, desc in confirm_messages.items %}
<div class="checkbox">
<label>
<input type="checkbox" class="checkbox" value="yes" name="confirm_{{ key }}" required>
<label for="input_confirm_{{ key }}">
<input type="checkbox" class="checkbox" value="yes" name="confirm_{{ key }}" id="input_confirm_{{ key }}" required>
{{ desc|safe }}
</label>
</div>

View File

@@ -9,19 +9,18 @@
{% csrf_token %}
<div class="panel-group" id="customer">
<div class="panel panel-default">
<label class="accordion-radio">
<div class="accordion-radio">
<div class="panel-heading">
<h4 class="panel-title">
<p class="panel-title">
<input type="radio" name="customer_mode" value="login"
data-parent="#customer"
{% if selected == "login" or not signup_allowed %}checked="checked"{% endif %}
id="input_customer_login"
data-toggle="radiocollapse" data-target="#customer_login"/>
<strong>
{% trans "Log in with a customer account" %}
</strong>
</h4>
<label for="input_customer_login"><strong>{% trans "Log in with a customer account" %}</strong></label>
</p>
</div>
</label>
</div>
<div id="customer_login"
class="panel-collapse collapsed {% if selected == "login" or not signup_allowed %}in{% endif %}">
<div class="panel-body form-horizontal">
@@ -67,19 +66,18 @@
</div>
{% if signup_allowed %}
<div class="panel panel-default">
<label class="accordion-radio">
<div class="accordion-radio">
<div class="panel-heading">
<h4 class="panel-title">
<p class="panel-title">
<input type="radio" name="customer_mode" value="register"
data-parent="#customer"
{% if selected == "register" %}checked="checked"{% endif %}
id="input_customer_register"
data-toggle="radiocollapse" data-target="#customer_register"/>
<strong>
{% trans "Create a new customer account" %}
</strong>
</h4>
<label for="input_customer_register"><strong>{% trans "Create a new customer account" %}</strong></label>
</p>
</div>
</label>
</div>
<div id="customer_register"
class="panel-collapse collapsed {% if selected == "register" %}in{% endif %}">
<div class="panel-body form-horizontal">
@@ -97,19 +95,19 @@
{% endif %}
{% if guest_allowed %}
<div class="panel panel-default">
<label class="accordion-radio">
<div class="accordion-radio">
<div class="panel-heading">
<h4 class="panel-title">
<p class="panel-title">
<input type="radio" name="customer_mode" value="guest"
data-parent="#customer"
{% if selected == "guest" %}checked="checked"{% endif %}
id="input_customer_guest"
aria-describedby="customer_guest"
data-toggle="radiocollapse" data-target="#customer_guest"/>
<strong>
{% trans "Continue as a guest" %}
</strong>
</h4>
<label for="input_customer_guest"><strong>{% trans "Continue as a guest" %}</strong></label>
</p>
</div>
</label>
</div>
<div id="customer_guest"
class="panel-collapse collapsed {% if selected == "guest" %}in{% endif %}">
<div class="panel-body form-horizontal">

View File

@@ -53,7 +53,7 @@
</label>
<div class="col-md-9 form-control-text">
<ul class="addon-list">
{{ form.position.subevent.name }} &middot; {{ form.position.subevent.get_date_range_display }}
{{ form.position.subevent.name }} &middot; {{ form.position.subevent.get_date_range_display_as_html }}
{% if form.position.event.settings.show_times %}
<span data-time="{{ form.position.subevent.date_from.isoformat }}" data-timezone="{{ request.event.timezone }}">
<span class="fa fa-clock-o" aria-hidden="true"></span>

View File

@@ -13,9 +13,9 @@
<div class="panel-group" id="payment_accordion">
{% for p in providers %}
<div class="panel panel-default" data-total="{{ p.total|floatformat:2 }}">
<label class="accordion-radio">
<div class="accordion-radio">
<div class="panel-heading">
<h4 class="panel-title">
<p class="panel-title">
{% if show_fees %}
<strong class="pull-right flip">{% if p.fee < 0 %}-{% else %}+{% endif %} {{ p.fee|money:event.currency|cut:"-" }}</strong>
{% endif %}
@@ -23,33 +23,39 @@
title="{{ p.provider.public_name }}"
data-parent="#payment_accordion"
{% if selected == p.provider.identifier %}checked="checked"{% endif %}
id="input_payment_{{ p.provider.identifier }}"
aria-describedby="payment_{{ p.provider.identifier }}"
data-toggle="radiocollapse" data-target="#payment_{{ p.provider.identifier }}"/>
<strong>{{ p.provider.public_name }}</strong>
</h4>
<label for="input_payment_{{ p.provider.identifier }}"><strong>{{ p.provider.public_name }}</strong></label>
</p>
</div>
</label>
</div>
<div id="payment_{{ p.provider.identifier }}"
class="panel-collapse collapsed {% if selected == p.provider.identifier %}in{% endif %}">
<div class="panel-body form-horizontal">
{% if request.event.testmode %}
{% if p.provider.test_mode_message %}
<div class="alert alert-info">
{{ p.provider.test_mode_message }}
<p>{{ p.provider.test_mode_message }}</p>
</div>
{% if not request.sales_channel.testmode_supported %}
<div class="alert alert-danger">
<p>
{% trans "This sales channel does not provide support for test mode." %}
<strong>
{% trans "If you continue, you might pay an actual order with non-existing money!" %}
</strong>
</p>
</div>
{% endif %}
{% else %}
<div class="alert alert-warning">
<p>
{% trans "This payment provider does not provide support for test mode." %}
<strong>
{% trans "If you continue, actual money might be transferred." %}
</strong>
</p>
</div>
{% endif %}
{% endif %}

View File

@@ -19,10 +19,10 @@
<div class="panel-group" id="questions_group">
<details class="panel panel-default" open>
<summary class="panel-heading">
<h4 class="panel-title">
<h3 class="panel-title">
<strong>{% trans "Contact information" %}</strong>
<i class="fa fa-angle-down collapse-indicator" aria-hidden="true"></i>
</h4>
</h3>
</summary>
<div id="contact">
<div class="panel-body">
@@ -36,13 +36,13 @@
{% if invoice_address_asked %}
<details class="panel panel-default" {% if event.settings.invoice_address_required or event.settings.invoice_name_required %}open{% endif %}>
<summary class="panel-heading">
<h4 class="panel-title">
<h3 class="panel-title">
<strong>{% trans "Invoice information" %}{% if not event.settings.invoice_address_required and not event.settings.invoice_name_required %}
{% trans "(optional)" %}
{% endif %}</strong>
<i class="fa fa-angle-down collapse-indicator" aria-hidden="true"></i>
</h4>
</h3>
</summary>
{% if addresses_data %}
{{ addresses_data|json_script:"addresses_json" }}
@@ -77,7 +77,7 @@
{% for pos, forms in formgroups %}
<details class="panel panel-default" open>
<summary class="panel-heading">
<h4 class="panel-title">
<h3 class="panel-title">
<strong>{{ pos.item.name }}
{% if pos.variation %}
{{ pos.variation }}
@@ -93,7 +93,7 @@
{% else %}
<i class="fa fa-angle-down collapse-indicator" aria-hidden="true"></i>
{% endif %}
</h4>
</h3>
</summary>
<div>
<div class="panel-body questions-form">
@@ -135,7 +135,7 @@
</label>
<div class="col-md-9 form-control-text">
<ul class="addon-list">
{{ pos.subevent.name }} &middot; {{ pos.subevent.get_date_range_display }}
{{ pos.subevent.name }} &middot; {{ pos.subevent.get_date_range_display_as_html }}
{% if pos.event.settings.show_times %}
<span data-time="{{ pos.subevent.date_from.isoformat }}" data-timezone="{{ request.event.timezone }}">
<span class="fa fa-clock-o" aria-hidden="true"></span>

View File

@@ -4,348 +4,397 @@
{% load rich_text %}
{% load money %}
{% blocktrans asvar s_taxes %}taxes{% endblocktrans %}
{% for line in cart.positions %}
<div class="row cart-row {% if download %}has-downloads{% endif %}{% if editable %}editable{% endif %}">
<div class="product">
{% if line.addon_to %}
<span class="addon-signifier">+</span>
<div role="table" aria-label="{% trans "Your cart" %}" aria-describedby="{% if cart.is_ordered %}cart-description{% else%}cart-deadline{% endif %}" aria-rowcount="{{ cart.positions|length|add:2 }}">
<div class="sr-only" role="rowgroup">
<div class="sr-only" role="row">
<span role="columnheader" aria-sort="none">{% trans "Product" %}</span>
{% if download %}
<span role="columnheader" aria-sort="none">{% trans "Ticket download" %}</span>
{% else %}
<span role="columnheader" aria-sort="none">{% trans "Price per item" %}</span>
{% endif %}
<strong>{{ line.item.name }}</strong>
{% if line.variation %}
{{ line.variation }}
{% endif %}
{% if line.seat %}
<div class="cart-icon-details">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="14" viewBox="0 0 4.7624999 3.7041668" class="svg-icon">
<path
d="m 1.9592032,1.8522629e-4 c -0.21468,0 -0.38861,0.17394000371 -0.38861,0.38861000371 0,0.21466 0.17393,0.38861 0.38861,0.38861 0.21468,0 0.3886001,-0.17395 0.3886001,-0.38861 0,-0.21467 -0.1739201,-0.38861000371 -0.3886001,-0.38861000371 z m 0.1049,0.84543000371 c -0.20823,-0.0326 -0.44367,0.12499 -0.39998,0.40462997 l 0.20361,1.01854 c 0.0306,0.15316 0.15301,0.28732 0.3483,0.28732 h 0.8376701 v 0.92708 c 0,0.29313 0.41187,0.29447 0.41187,0.005 v -1.19115 c 0,-0.14168 -0.0995,-0.29507 -0.29094,-0.29507 l -0.65578,-10e-4 -0.1757,-0.87644 C 2.3042533,0.95300523 2.1890432,0.86500523 2.0641032,0.84547523 Z m -0.58549,0.44906997 c -0.0946,-0.0134 -0.20202,0.0625 -0.17829,0.19172 l 0.18759,0.91054 c 0.0763,0.33956 0.36802,0.55914 0.66042,0.55914 h 0.6015201 c 0.21356,0 0.21448,-0.32143 -0.003,-0.32143 H 2.1954632 c -0.19911,0 -0.36364,-0.11898 -0.41341,-0.34107 l -0.17777,-0.87126 c -0.0165,-0.0794 -0.0688,-0.11963 -0.12557,-0.12764 z"/>
</svg>
{{ line.seat }}
</div>
{% endif %}
{% if line.voucher %}
<div class="cart-icon-details">
<span class="fa fa-tags fa-fw" aria-hidden="true"></span> {% trans "Voucher code used:" %} {{ line.voucher.code }}
</div>
{% endif %}
{% if line.subevent %}
<div class="cart-icon-details">
<span class="fa fa-calendar fa-fw" aria-hidden="true"></span> {{ line.subevent.name }}
<br>
<span class="text-muted">
{{ line.subevent.get_date_range_display }}
{% if event.settings.show_times %}
&middot; <span data-time="{{ line.subevent.date_from.isoformat }}" data-timezone="{{ request.event.timezone }}" data-time-short>
{{ line.subevent.get_time_range_display }}
</span>
{% endif %}
</span>
</div>
{% if line.subevent.location %}
{% if not line.addon_to or line.addon_to.subevent_id != line.subevent_id %}
<div class="cart-icon-details collapse-lines" data-expand-text="{% trans "Show full location" %}">
<span class="content text-muted" id="full-location-{{ line.pk }}">{{ line.subevent.location|linebreaksbr }}</span>
<span role="columnheader" aria-sort="none">{% trans "Price total" %}</span>
</div>
</div>
<div role="rowgroup">
{% for line in cart.positions %}
<div role="row" class="row cart-row {% if download %}has-downloads{% endif %}{% if editable %}editable{% endif %}">
<div role="cell" class="product">
<p>
{% if line.addon_to %}
<span class="addon-signifier">+</span>
{% endif %}
<strong>{{ line.item.name }}</strong>
{% if line.variation %}
{{ line.variation }}
{% endif %}
</p>
{% if line.seat or line.voucher or line.subevent or line.used_membership%}
<dl class="dl-inline">
{% endif %}
{% if line.seat %}
<div class="cart-icon-details">
<dt class="sr-only">{% trans "Seat:" %}</dt>
<dd>
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="14" viewBox="0 0 4.7624999 3.7041668" class="svg-icon">
<path
d="m 1.9592032,1.8522629e-4 c -0.21468,0 -0.38861,0.17394000371 -0.38861,0.38861000371 0,0.21466 0.17393,0.38861 0.38861,0.38861 0.21468,0 0.3886001,-0.17395 0.3886001,-0.38861 0,-0.21467 -0.1739201,-0.38861000371 -0.3886001,-0.38861000371 z m 0.1049,0.84543000371 c -0.20823,-0.0326 -0.44367,0.12499 -0.39998,0.40462997 l 0.20361,1.01854 c 0.0306,0.15316 0.15301,0.28732 0.3483,0.28732 h 0.8376701 v 0.92708 c 0,0.29313 0.41187,0.29447 0.41187,0.005 v -1.19115 c 0,-0.14168 -0.0995,-0.29507 -0.29094,-0.29507 l -0.65578,-10e-4 -0.1757,-0.87644 C 2.3042533,0.95300523 2.1890432,0.86500523 2.0641032,0.84547523 Z m -0.58549,0.44906997 c -0.0946,-0.0134 -0.20202,0.0625 -0.17829,0.19172 l 0.18759,0.91054 c 0.0763,0.33956 0.36802,0.55914 0.66042,0.55914 h 0.6015201 c 0.21356,0 0.21448,-0.32143 -0.003,-0.32143 H 2.1954632 c -0.19911,0 -0.36364,-0.11898 -0.41341,-0.34107 l -0.17777,-0.87126 c -0.0165,-0.0794 -0.0688,-0.11963 -0.12557,-0.12764 z"/>
</svg>
{{ line.seat }}
</dd>
</div>
{% endif %}
{% if line.voucher %}
<div class="cart-icon-details">
<dt><span class="fa fa-tags fa-fw" aria-hidden="true"></span> {% trans "Voucher code used:" %}</dt>
<dd>{{ line.voucher.code }}</dd>
</div>
{% endif %}
{% endif %}
{% if line.used_membership %}
<div class="cart-icon-details">
<span class="fa fa-id-card fa-fw" aria-hidden="true"></span> {{ line.used_membership }}
</div>
{% endif %}
{% if line.issued_gift_cards %}
<dl>
{% for gc in line.issued_gift_cards.all %}
<dt>{% trans "Gift card code" %}</dt>
<dd>{{ gc.secret }}</dd>
{% endfor %}
</dl>
{% endif %}
{% if line.has_questions %}
<dl>
{% if line.item.admission and event.settings.attendee_names_asked %}
<dt class="sr-only">
{% trans "Attendee name" %}
</dt>
<dd class="toplevel">
<span data-toggle="tooltip" title="{% trans "Attendee name" %}">
{% if line.attendee_name %}{{ line.attendee_name }}{% else %}<em>{% trans "No attendee name provided" %}</em>{% endif %}
</span>
</dd>
{% endif %}
{% if line.item.admission and event.settings.attendee_emails_asked and line.attendee_email %}
<dt class="sr-only">
{% trans "Attendee email" %}
</dt>
<dd class="toplevel">
<span data-toggle="tooltip" title="{% trans "Attendee email" %}">
{{ line.attendee_email }}
</span>
</dd>
{% endif %}
{% if line.item.admission and event.settings.attendee_addresses_asked %}
<br>
{% endif %}
{% if line.item.admission and event.settings.attendee_company_asked and line.company %}
<dt class="sr-only">
{% trans "Attendee company" %}
</dt>
<dd class="toplevel">
<span data-toggle="tooltip" title="{% trans "Attendee company" %}">
{{ line.company }}
</span>
</dd>
{% endif %}
{% if line.item.admission and event.settings.attendee_addresses_asked %}
{% if line.street or line.zipcode or line.city %}
<dt class="sr-only">
{% trans "Attendee address" %}
</dt>
<dd class="toplevel">
<span data-toggle="tooltip" title="{% trans "Attendee address" %}">
{{ line.street|default_if_none:""|linebreaksbr }}<br>
{{ line.zipcode|default_if_none:"" }} {{ line.city|default_if_none:"" }}<br>
{{ line.country.name|default_if_none:"" }}
{% if line.state %}<br>{{ line.state }}{% endif %}
</span>
</dd>
{% endif %}
{% endif %}
{% for q in line.questions %}
<dt>{{ q.question }}</dt>
{% if line.subevent %}
<div class="cart-icon-details">
<dt class="sr-only">{% trans "Date:" context "subevent" %}</dt>
<dd>
{% if q.answer %}
{% if q.answer.file %}
<span class="fa fa-file" aria-hidden="true"></span>
<a href="{{ q.answer.frontend_file_url }}?token={% answer_token request q.answer %}">
{{ q.answer.file_name }}
</a>
{% if q.answer.is_image %}
<br>
<a href="{{ q.answer.frontend_file_url }}?token={% answer_token request q.answer %}" data-lightbox="order"
class="answer-thumb">
<img src="{{ q.answer.frontend_file_url }}?token={% answer_token request q.answer %}">
</a>
{% endif %}
{% elif q.type == "M" %}
{{ q.answer|rich_text_snippet }}
{% else %}
{{ q.answer|linebreaksbr }}
{% endif %}
{% else %}
<em>{% trans "not answered" %}</em>
<span class="fa fa-calendar fa-fw" aria-hidden="true"></span> {{ line.subevent.name }}
<br>
<span class="text-muted" aria-hidden="true">
{{ line.subevent.get_date_range_display }}
{% if event.settings.show_times %}
&middot; <span data-time="{{ line.subevent.date_from.isoformat }}" data-timezone="{{ request.event.timezone }}" data-time-short>
{{ line.subevent.get_time_range_display }}
</span>
{% endif %}
</span>
<span class="sr-only">
<time datetime="{% if event.settings.show_times %}{{ line.subevent.date_from.isoformat }}{% else %}{{ line.subevent.date_from|date:"Y-m-d" }}{% endif %}">{{ line.subevent.get_date_from_display }}</time>
{% if event.settings.show_date_to and line.subevent.date_to %}
<time datetime="{% if event.settings.show_times %}{{ line.subevent.date_to.isoformat }}{% else %}{{ line.subevent.date_to|date:"Y-m-d" }}{% endif %}">{{ line.subevent.get_date_to_display }}</time>
{% endif %}
</span>
</dd>
{% endfor %}
{% for q in line.additional_answers %}
<dt>{{ q.question }}</dt>
<dd>{% if q.answer %}{{ q.answer|linebreaksbr }}{% else %}<em>{% trans "not answered" %}</em>{% endif %}</dd>
{% endfor %}
</dl>
{% endif %}
</div>
</div>
{% if line.subevent.location %}
{% if not line.addon_to or line.addon_to.subevent_id != line.subevent_id %}
<div class="cart-icon-details">
<dt class="sr-only">{% trans "Location:" %}</dt>
<dd>
<div class="collapse-lines" data-expand-text="{% trans "Show full location" %}" aria-hidden="true">
<span class="content text-muted" id="full-location-{{ line.pk }}">{{ line.subevent.location|linebreaksbr }}</span>
</div>
<div class="sr-only">{{ line.subevent.location|linebreaksbr }}</div>
</dd>
</div>
{% endif %}
{% endif %}
{% endif %}
{% if line.used_membership %}
<div class="cart-icon-details">
<dt class="sr-only">{% trans "Membership:" %}</dt>
<dd>
<span class="fa fa-id-card fa-fw" aria-hidden="true"></span> {{ line.used_membership }}
</dd>
</div>
{% endif %}
{% if line.seat or line.voucher or line.subevent or line.used_membership%}
</dl>
{% endif %}
{% if download %}
<div class="download-desktop">
{% if line.generate_ticket %}
{% for b in download_buttons %}
<form action="{% if position_page and line.addon_to %}{% eventurl event "presale:event.order.position.download" secret=line.addon_to.web_secret order=order.code output=b.identifier pid=line.pk position=line.addon_to.positionid %}{% elif position_page %}{% eventurl event "presale:event.order.position.download" secret=line.web_secret order=order.code output=b.identifier pid=line.pk position=line.positionid %}{% else %}{% eventurl event "presale:event.order.download" secret=order.secret order=order.code output=b.identifier position=line.pk %}{% endif %}"
method="post" data-asynctask data-asynctask-download class="download-btn-form{% if b.javascript_required %} requirejs{% endif %}">
{% if line.issued_gift_cards.exists %}
<dl class="dl-indented">
{% for gc in line.issued_gift_cards.all %}
<dt>{% trans "Gift card code" %}</dt>
<dd>{{ gc.secret }}</dd>
{% endfor %}
</dl>
{% endif %}
{% if line.has_questions %}
<dl class="dl-indented">
{% if line.item.admission %}
{% if event.settings.attendee_names_asked %}
<dt class="sr-only">
{% trans "Attendee name" %}
</dt>
<dd class="toplevel{% if event.settings.attendee_addresses_asked and not event.settings.attendee_emails_asked %} blank-after{% endif %}">
<span data-toggle="tooltip" title="{% trans "Attendee name" %}">
{% if line.attendee_name %}{{ line.attendee_name }}{% else %}<em>{% trans "No attendee name provided" %}</em>{% endif %}
</span>
</dd>
{% endif %}
{% if event.settings.attendee_emails_asked and line.attendee_email %}
<dt class="sr-only">
{% trans "Attendee email" %}
</dt>
<dd class="toplevel{% if event.settings.attendee_addresses_asked %} blank-after{% endif %}">
<span data-toggle="tooltip" title="{% trans "Attendee email" %}">
{{ line.attendee_email }}
</span>
</dd>
{% endif %}
{% if event.settings.attendee_company_asked and line.company %}
<dt class="sr-only">
{% trans "Attendee company" %}
</dt>
<dd class="toplevel">
<span data-toggle="tooltip" title="{% trans "Attendee company" %}">
{{ line.company }}
</span>
</dd>
{% endif %}
{% if event.settings.attendee_addresses_asked %}
{% if line.street or line.zipcode or line.city %}
<dt class="sr-only">
{% trans "Attendee address" %}
</dt>
<dd class="toplevel">
<span data-toggle="tooltip" title="{% trans "Attendee address" %}">
{{ line.street|default_if_none:""|linebreaksbr }}<br>
{{ line.zipcode|default_if_none:"" }} {{ line.city|default_if_none:"" }}<br>
{{ line.country.name|default_if_none:"" }}
{% if line.state %}<br>{{ line.state }}{% endif %}
</span>
</dd>
{% endif %}
{% endif %}
{% endif %}
{% for q in line.questions %}
<dt>{{ q.question }}</dt>
<dd>
{% if q.answer %}
{% if q.answer.file %}
<span class="fa fa-file" aria-hidden="true"></span>
<a href="{{ q.answer.frontend_file_url }}?token={% answer_token request q.answer %}">
{{ q.answer.file_name }}
</a>
{% if q.answer.is_image %}
<br>
<a href="{{ q.answer.frontend_file_url }}?token={% answer_token request q.answer %}" data-lightbox="order"
class="answer-thumb">
<img src="{{ q.answer.frontend_file_url }}?token={% answer_token request q.answer %}" alt="{% trans "The image you previously uploaded" %}">
</a>
{% endif %}
{% elif q.type == "M" %}
{{ q.answer|rich_text_snippet }}
{% else %}
{{ q.answer|linebreaksbr }}
{% endif %}
{% else %}
<em>{% trans "not answered" %}</em>
{% endif %}
</dd>
{% endfor %}
{% for q in line.additional_answers %}
<dt>{{ q.question }}</dt>
<dd>{% if q.answer %}{{ q.answer|linebreaksbr }}{% else %}<em>{% trans "not answered" %}</em>{% endif %}</dd>
{% endfor %}
</dl>
{% endif %}
</div>
{% if download %}
<div role="cell" class="download-desktop">
{% if line.generate_ticket %}
{% for b in download_buttons %}
<form action="{% if position_page and line.addon_to %}{% eventurl event "presale:event.order.position.download" secret=line.addon_to.web_secret order=order.code output=b.identifier pid=line.pk position=line.addon_to.positionid %}{% elif position_page %}{% eventurl event "presale:event.order.position.download" secret=line.web_secret order=order.code output=b.identifier pid=line.pk position=line.positionid %}{% else %}{% eventurl event "presale:event.order.download" secret=order.secret order=order.code output=b.identifier position=line.pk %}{% endif %}"
method="post" data-asynctask data-asynctask-download class="download-btn-form{% if b.javascript_required %} requirejs{% endif %}">
{% csrf_token %}
<button type="submit"
class="btn btn-sm {% if b.identifier == "pdf" %}btn-primary{% else %}btn-default{% endif %}">
<span class="fa {{ b.icon }}" aria-hidden="true"></span> {{ b.text }}
</button>
</form>
{% endfor %}
{% endif %}
</div>
{% elif line.addon_to %}
<div role="cell" class="count">&nbsp;</div>
<div role="cell" class="singleprice price">
{% if event.settings.display_net_prices %}
{{ line.net_price|money:event.currency }}
{% else %}
{{ line.price|money:event.currency }}
{% endif %}
</div>
{% else %}
<div role="cell" class="count">
{% if editable %}
<form action="{% eventurl event "presale:event.cart.remove" cart_namespace=cart_namespace|default_if_none:"" %}"
data-asynctask-headline="{% trans "Okay, we're removing that" %}"
method="post" data-asynctask>
{% csrf_token %}
<button type="submit"
class="btn btn-sm {% if b.identifier == "pdf" %}btn-primary{% else %}btn-default{% endif %}">
<span class="fa {{ b.icon }}" aria-hidden="true"></span> {{ b.text }}
<input type="hidden" name="id" value="{{ line.id }}" />
{% if line.seat or line.count == 1 %}
<button class="btn btn-mini btn-link" title="{% blocktrans with item=line.item %}Remove {{item}} from your cart{% endblocktrans %}">
<i class="fa fa-trash" aria-hidden="true"></i>
<span class="sr-only">{% blocktrans with item=line.item %}Remove {{item}} from your cart{% endblocktrans %}</span>
</button>
{% else %}
<button class="btn btn-mini btn-link" title="{% blocktrans with item=line.item %}Remove one {{item}} from your cart{% endblocktrans %}">
<i class="fa fa-minus" aria-hidden="true"></i>
<span class="sr-only">{% blocktrans with item=line.item count=line.count %}Remove one {{item}} from your cart. You currently have {{count }} in your cart.{% endblocktrans %}</span>
</button>
{% endif %}
</form>
{% endif %}
{{ line.count }}
{% if editable %}
<form action="{% eventurl event "presale:event.cart.add" cart_namespace=cart_namespace|default_if_none:"" %}"
data-asynctask-headline="{% trans "We're trying to reserve another one for you!" %}"
data-asynctask-text="{% blocktrans with time=event.settings.reservation_time %}Once the items are in your cart, you will have {{ time }} minutes to complete your purchase.{% endblocktrans %}"
method="post" data-asynctask>
<input type="hidden" name="subevent" value="{{ line.subevent_id|default_if_none:"" }}" />
{% csrf_token %}
{% if line.variation %}
<input type="hidden" name="variation_{{ line.item.id }}_{{ line.variation.id }}"
value="1" />
<input type="hidden" name="price_{{ line.item.id }}_{{ line.variation.id }}"
value="{% if event.settings.display_net_prices %}{{ line.bundle_sum_net }}{% else %}{{ line.bundle_sum }}{% endif %}" />
{% else %}
<input type="hidden" name="item_{{ line.item.id }}"
value="1" />
<input type="hidden" name="price_{{ line.item.id }}"
value="{% if event.settings.display_net_prices %}{{ line.bundle_sum_net }}{% else %}{{ line.bundle_sum }}{% endif %}" />
{% endif %}
<button class="btn btn-mini btn-link {% if line.seat %}btn-invisible{% endif %}" title="{% blocktrans with item=line.item %}Add one more {{item}} to your cart{% endblocktrans %}" {% if line.seat %}disabled{% endif %}>
<i class="fa fa-plus" aria-hidden="true"></i>
<span class="sr-only">{% blocktrans with item=line.item count=line.count %}Add one more {{item}} to your cart. You currently have {{ count }} in your cart.{% endblocktrans %}</span>
</button>
</form>
{% endfor %}
{% endif %}
</div>
{% elif line.addon_to %}
<div class="count">&nbsp;</div>
<div class="singleprice price">
<span class="sr-only">{% trans "price per item" %}</span>
{% if event.settings.display_net_prices %}
{{ line.net_price|money:event.currency }}
{% else %}
{{ line.price|money:event.currency }}
{% endif %}
</div>
{% else %}
<div class="count">
{% if editable %}
<form action="{% eventurl event "presale:event.cart.remove" cart_namespace=cart_namespace|default_if_none:"" %}"
data-asynctask-headline="{% trans "Okay, we're removing that" %}"
method="post" data-asynctask>
{% csrf_token %}
<input type="hidden" name="id" value="{{ line.id }}" />
<button class="btn btn-mini btn-link" title="{% trans "Remove one" %}" aria-label="{% trans "Remove one" %}">
{% if line.seat %}
<i class="fa fa-trash" aria-hidden="true"></i>
{% else %}
<i class="fa fa-minus" aria-hidden="true"></i>
{% endif %}
</button>
</form>
{% endif %}
<span class="sr-only">{% trans "quantity" %}</span>
{{ line.count }}
{% if editable %}
<form action="{% eventurl event "presale:event.cart.add" cart_namespace=cart_namespace|default_if_none:"" %}"
data-asynctask-headline="{% trans "We're trying to reserve another one for you!" %}"
data-asynctask-text="{% blocktrans with time=event.settings.reservation_time %}Once the items are in your cart, you will have {{ time }} minutes to complete your purchase.{% endblocktrans %}"
method="post" data-asynctask>
<input type="hidden" name="subevent" value="{{ line.subevent_id|default_if_none:"" }}" />
{% csrf_token %}
{% if line.variation %}
<input type="hidden" name="variation_{{ line.item.id }}_{{ line.variation.id }}"
value="1" />
<input type="hidden" name="price_{{ line.item.id }}_{{ line.variation.id }}"
value="{% if event.settings.display_net_prices %}{{ line.bundle_sum_net }}{% else %}{{ line.bundle_sum }}{% endif %}" />
{% else %}
<input type="hidden" name="item_{{ line.item.id }}"
value="1" />
<input type="hidden" name="price_{{ line.item.id }}"
value="{% if event.settings.display_net_prices %}{{ line.bundle_sum_net }}{% else %}{{ line.bundle_sum }}{% endif %}" />
{% endif %}
<button class="btn btn-mini btn-link {% if line.seat %}btn-invisible{% endif %}" title="{% trans "Add one more" %}" aria-label="{% trans "Add one more" %}" {% if line.seat %}disabled{% endif %}>
<i class="fa fa-plus" aria-hidden="true"></i>
</button>
</form>
{% endif %}
</div>
<div class="singleprice price">
<span class="sr-only">{% trans "price per item" %}</span>
{% if event.settings.display_net_prices %}
{{ line.net_price|money:event.currency }}
{% else %}
{{ line.price|money:event.currency }}
{% endif %}
</div>
{% endif %}
<div class="totalprice price">
<span class="sr-only">{% trans "price" %}</span>
{% if event.settings.display_net_prices %}
<strong>{{ line.net_total|money:event.currency }}</strong>
{% if line.tax_rate and line.total %}
<br />
<small>
{% blocktrans trimmed with rate=line.tax_rate|floatformat:-2 taxname=line.tax_rule.name|default:s_taxes %}
<strong>plus</strong> {{ rate }}% {{ taxname }}
{% endblocktrans %}
</small>
{% endif %}
{% else %}
<strong>{{ line.total|money:event.currency }}</strong>
{% if line.tax_rate and line.total %}
<br />
<small>
{% blocktrans trimmed with rate=line.tax_rate|floatformat:-2 taxname=line.tax_rule.name|default:s_taxes %}
incl. {{ rate }}% {{ taxname }}
{% endblocktrans %}
</small>
{% endif %}
{% endif %}
</div>
<div class="clearfix"></div>
</div>
{% endfor %}
{% for fee in cart.fees %}
<div class="row cart-row">
<div class="col-md-4 col-xs-6">
<strong>{{ fee.get_fee_type_display }}</strong>
</div>
<div class="col-md-3 col-xs-6 col-md-offset-5 price">
{% if event.settings.display_net_prices %}
<strong>{{ fee.net_value|money:event.currency }}</strong>
{% if fee.tax_rate %}
<br />
<small>
{% blocktrans trimmed with rate=fee.tax_rate|floatformat:-2 taxname=fee.tax_rule.name|default:s_taxes %}
<strong>plus</strong> {{ rate }}% {{ taxname }}
{% endblocktrans %}
</small>
{% endif %}
{% else %}
<strong>{{ fee.value|money:event.currency }}</strong>
{% if fee.tax_rate %}
<br />
<small>
{% blocktrans trimmed with rate=fee.tax_rate|floatformat:-2 taxname=fee.tax_rule.name|default:s_taxes %}
incl. {{ rate }}% {{ taxname }}
{% endblocktrans %}
</small>
{% endif %}
{% endif %}
</div>
<div class="clearfix"></div>
</div>
{% endfor %}
{% if event.settings.display_net_prices and cart.tax_total %}
<div class="row cart-row total">
<div class="col-md-4 col-xs-6">
<strong>{% trans "Net total" %}</strong>
</div>
<div class="col-md-3 col-xs-6 col-md-offset-5 price">
{{ cart.net_total|money:event.currency }}
</div>
<div class="clearfix"></div>
</div>
<div class="row cart-row">
<div class="col-md-4 col-xs-6">
<strong>{% trans "Taxes" %}</strong>
</div>
<div class="col-md-3 col-xs-6 col-md-offset-5 price">
{{ cart.tax_total|money:event.currency }}
</div>
<div class="clearfix"></div>
</div>
{% endif %}
<div class="row cart-row total">
<div class="product">
<strong>{% trans "Total" %}</strong><br>
<span class="text-muted">
{% blocktrans trimmed count num=cart.itemcount %}
One product
{% plural %}
{{ num }} products
{% endblocktrans %}
</span>
</div>
<div class="count hidden-xs hidden-sm">
</div>
<div class="col-md-3 col-xs-6 col-md-offset-3 price">
<strong>{{ cart.total|money:event.currency }}</strong>
{% if not event.settings.display_net_prices and cart.tax_total and not editable %}
<small class="text-muted">
{% blocktrans trimmed with tax_sum=cart.tax_total|money:event.currency %}
incl. {{ tax_sum }} taxes
{% endblocktrans %}
</small>
{% endif %}
{% if editable and vouchers_exist and not cart.all_with_voucher %}
<br>
<a class="js-only apply-voucher-toggle" href="#">
<span class="fa fa-tag" aria-hidden="true"></span> {% trans "Redeem a voucher" %}
</a>
<form action="{% eventurl event "presale:event.cart.voucher" cart_namespace=cart_namespace|default_if_none:"" %}"
data-asynctask-headline="{% trans "We're applying this voucher to your cart..." %}"
method="post" data-asynctask class="apply-voucher">
{% csrf_token %}
<label for="voucher_code" class="sr-only">{% trans "Voucher code" %}</label>
<div class="input-group">
<input type="text" class="form-control" name="voucher" id="voucher_code" placeholder="{% trans "Voucher code" %}" aria-label="{% trans "Voucher code" %}">
<span class="input-group-btn">
<button class="btn btn-primary" type="submit">
<span class="fa fa-check" aria-hidden="true"></span><span class="sr-only"> {% trans "Redeem voucher" %}</span>
</button>
</span>
</div>
</form>
{% endif %}
<div role="cell" class="singleprice price">
{% if event.settings.display_net_prices %}
{{ line.net_price|money:event.currency }}
{% else %}
{{ line.price|money:event.currency }}
{% endif %}
</div>
{% endif %}
<div role="cell" class="totalprice price">
{% if event.settings.display_net_prices %}
<strong>{{ line.net_total|money:event.currency }}</strong>
{% if line.tax_rate and line.total %}
<br />
<small>
{% blocktrans trimmed with rate=line.tax_rate|floatformat:-2 taxname=line.tax_rule.name|default:s_taxes %}
<strong>plus</strong> {{ rate }}% {{ taxname }}
{% endblocktrans %}
</small>
{% endif %}
{% else %}
<strong>{{ line.total|money:event.currency }}</strong>
{% if line.tax_rate and line.total %}
<br />
<small>
{% blocktrans trimmed with rate=line.tax_rate|floatformat:-2 taxname=line.tax_rule.name|default:s_taxes %}
incl. {{ rate }}% {{ taxname }}
{% endblocktrans %}
</small>
{% endif %}
{% endif %}
</div>
<div class="clearfix"></div>
</div>
{% endfor %}
{% for fee in cart.fees %}
<div class="row cart-row">
<div class="col-md-4 col-xs-6">
<strong>{{ fee.get_fee_type_display }}</strong>
</div>
<div class="col-md-3 col-xs-6 col-md-offset-5 price">
{% if event.settings.display_net_prices %}
<strong>{{ fee.net_value|money:event.currency }}</strong>
{% if fee.tax_rate %}
<br />
<small>
{% blocktrans trimmed with rate=fee.tax_rate|floatformat:-2 taxname=fee.tax_rule.name|default:s_taxes %}
<strong>plus</strong> {{ rate }}% {{ taxname }}
{% endblocktrans %}
</small>
{% endif %}
{% else %}
<strong>{{ fee.value|money:event.currency }}</strong>
{% if fee.tax_rate %}
<br />
<small>
{% blocktrans trimmed with rate=fee.tax_rate|floatformat:-2 taxname=fee.tax_rule.name|default:s_taxes %}
incl. {{ rate }}% {{ taxname }}
{% endblocktrans %}
</small>
{% endif %}
{% endif %}
</div>
<div class="clearfix"></div>
</div>
{% endfor %}
</div>
<div role="rowgroup">
{% if event.settings.display_net_prices and cart.tax_total %}
<div role="row" class="row cart-row">
<div role="cell" class="product">
<strong>{% trans "Net total" %}</strong>
</div>
<div role="cell" class="count hidden-xs hidden-sm"></div>
<div role="cell" class="singleprice price"></div>
<div role="cell" class="totalprice price">
{{ cart.net_total|money:event.currency }}
</div>
<div class="clearfix"></div>
</div>
<div role="row" class="row cart-row">
<div role="cell" class="product">
<strong>{% trans "Taxes" %}</strong>
</div>
<div role="cell" class="count hidden-xs hidden-sm"></div>
<div role="cell" class="singleprice price"></div>
<div role="cell" class="totalprice price">
{{ cart.tax_total|money:event.currency }}
</div>
<div class="clearfix"></div>
</div>
{% endif %}
<div role="row" class="row cart-row total">
<div role="cell" class="product">
<strong>{% trans "Total" %}</strong><br>
<span class="text-muted">
{% blocktrans trimmed count num=cart.itemcount %}
One product
{% plural %}
{{ num }} products
{% endblocktrans %}
</span>
</div>
<div role="cell" class="count hidden-xs hidden-sm"></div>
<div role="cell" class="singleprice price"></div>
<div role="cell" class="totalprice price">
<strong>{{ cart.total|money:event.currency }}</strong>
{% if not event.settings.display_net_prices and cart.tax_total and not editable %}
<small class="text-muted">
{% blocktrans trimmed with tax_sum=cart.tax_total|money:event.currency %}
incl. {{ tax_sum }} taxes
{% endblocktrans %}
</small>
{% endif %}
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
{% if not cart.is_ordered %}
<p class="text-muted" id="cart-deadline" data-expires="{{ cart.first_expiry|date:"Y-m-d H:i:sO" }}">
{% if cart.minutes_left > 0 or cart.seconds_left > 0 %}
{% blocktrans trimmed with minutes=cart.minutes_left %}
The items in your cart are reserved for you for {{ minutes }} minutes.
{% endblocktrans %}
{% else %}
{% trans "The items in your cart are no longer reserved for you. You can still complete your order as long as theyre available." %}
{% endif %}
</p>
{% else %}
<p class="sr-only" id="cart-description">{% trans "Overview of your ordered products." %}</p>
{% endif %}
</div>
<div class="clearfix"></div>
</div>

View File

@@ -5,61 +5,65 @@
{% load money %}
<details class="panel {% if open %}panel-primary{% else %}panel-default{% endif %} cart" {% if open %}open{% endif %}>
<summary class="panel-heading">
<h3 class="panel-title">
<span>
<i class="fa fa-shopping-cart" aria-hidden="true"></i>
<strong>{% trans "Your cart" %}</strong>
</span>
<h2 class="panel-title">
<span>
<strong id="cart-deadline-short" data-expires="{{ cart.first_expiry|date:"Y-m-d H:i:sO" }}" aria-hidden="true">
{% if cart.minutes_left > 0 or cart.seconds_left > 0 %}
{{ cart.minutes_left|stringformat:"02d" }}:{{ cart.seconds_left|stringformat:"02d" }}
{% else %}
{% trans "Cart expired" %}
{% endif %}
</strong>
<i class="fa fa-angle-down collapse-indicator" aria-hidden="true"></i>
</span>
</h3>
<i class="fa fa-shopping-cart" aria-hidden="true"></i>
<strong>{% trans "Your cart" %}</strong>
</span>
<span aria-hidden="true">
<strong id="cart-deadline-short" data-expires="{{ cart.first_expiry|date:"Y-m-d H:i:sO" }}" aria-hidden="true">
{% if cart.minutes_left > 0 or cart.seconds_left > 0 %}
{{ cart.minutes_left|stringformat:"02d" }}:{{ cart.seconds_left|stringformat:"02d" }}
{% else %}
{% trans "Cart expired" %}
{% endif %}
</strong>
<i class="fa fa-angle-down collapse-indicator" aria-hidden="true"></i>
</span>
</h2>
</summary>
<div>
<div class="panel-body">
{% include "pretixpresale/event/fragment_cart.html" with cart=cart event=request.event editable=True %}
<em id="cart-deadline" data-expires="{{ cart.first_expiry|date:"Y-m-d H:i:sO" }}">
{% if cart.minutes_left > 0 or cart.seconds_left > 0 %}
{% blocktrans trimmed with minutes=cart.minutes_left %}
The items in your cart are reserved for you for {{ minutes }} minutes.
{% endblocktrans %}
{% else %}
{% trans "The items in your cart are no longer reserved for you." %}
{% endif %}
</em>
<div class="row checkout-button-row">
<div class="col-md-4 col-sm-6 col-xs-12 hidden-xs">
<form method="post" data-asynctask action="{% eventurl request.event "presale:event.cart.clear" cart_namespace=cart_namespace %}">
{% csrf_token %}
<button class="btn btn-block btn-default btn-lg" type="submit">
<i class="fa fa-close" aria-hidden="true"></i> {% trans "Empty cart" %}</button>
</form>
</div>
<div class="col-md-4 col-sm-6 col-md-offset-4 col-xs-12">
<a class="btn btn-block btn-primary btn-lg"
href="{% eventurl request.event "presale:event.checkout.start" cart_namespace=cart_namespace %}">
<div class="checkout-button-row">
<form class="checkout-button-primary" method="get" action="{% eventurl request.event "presale:event.checkout.start" cart_namespace=cart_namespace %}">
<p><button class="btn btn-primary btn-lg" type="submit"{% if has_addon_choices or cart.total == 0 %} aria-label="{% trans "Continue with order process" %}"{% endif %}>
<i class="fa fa-shopping-cart" aria-hidden="true"></i>
{% if has_addon_choices or cart.total == 0 %}
<i class="fa fa-shopping-cart" aria-hidden="true"></i> {% trans "Continue" %}
{% trans "Continue" %}
{% else %}
<i class="fa fa-shopping-cart" aria-hidden="true"></i> {% trans "Proceed with checkout" %}
{% trans "Proceed with checkout" %}
{% endif %}
</a>
</div>
<div class="visible-xs-block col-xs-12">
</button></p>
</form>
<div class="checkout-button-secondary">
<form method="post" data-asynctask action="{% eventurl request.event "presale:event.cart.clear" cart_namespace=cart_namespace %}">
{% csrf_token %}
<button class="btn btn-block btn-default btn-lg" type="submit">
<i class="fa fa-close" aria-hidden="true"></i> {% trans "Empty cart" %}</button>
<p><button class="btn btn-default" type="submit">
<i class="fa fa-close" aria-hidden="true"></i> {% trans "Empty cart" %}</button></p>
</form>
{% if vouchers_exist and not cart.all_with_voucher %}
<div class="toggle-container">
<p class="toggle-summary"><button class="js-only toggle toggle-remove btn btn-default" aria-expanded="false">
<span class="fa fa-tag" aria-hidden="true"></span> {% trans "Redeem a voucher" %}
</button></p>
<form action="{% eventurl event "presale:event.cart.voucher" cart_namespace=cart_namespace|default_if_none:"" %}"
data-asynctask-headline="{% trans "We're applying this voucher to your cart..." %}"
method="post" data-asynctask>
{% csrf_token %}
<label for="voucher_code" class="sr-only">{% trans "Voucher code" %}</label>
<div class="input-group">
<input type="text" class="form-control" name="voucher" id="voucher_code" placeholder="{% trans "Voucher code" %}" aria-label="{% trans "Voucher code" %}">
<span class="input-group-btn">
<button class="btn btn-primary" type="submit">
<span class="fa fa-check" aria-hidden="true"></span><span class="sr-only"> {% trans "Redeem voucher" %}</span>
</button>
</span>
</div>
</form>
</div>
{% endif %}
</div>
<div class="clearfix"></div>
</div>
</div>
</div>

View File

@@ -1,32 +1,30 @@
{% load i18n %}
<div class="checkout-flow">
<nav aria-label="{% trans "Checkout steps" context "checkoutflow" %}">
<ol class="checkout-flow">
{% for step in checkout_flow %}
<a {% if step.c_is_before %}href="{{ step.c_resolved_url }}"{% endif %} class="checkout-step {% if step.c_is_before %}step-done{% elif request.resolver_match.kwargs.step == step.identifier %}step-current{% endif %}">
<div class="checkout-step-bar-left"></div>
<div class="checkout-step-bar-right"></div>
<li class="checkout-step {% if step.c_is_before %}step-done{% elif request.resolver_match.kwargs.step == step.identifier %}step-current{% endif %}">
{% if step.c_is_before %}<a href="{{ step.c_resolved_url }}">{% endif %}
<div class="checkout-step-icon">
<span class="fa {% if step.c_is_before %}fa-check{% elif step.icon %}fa-{{ step.icon }}{% else %}fa-pencil{% endif %}" aria-hidden="true"></span>
</div>
<div class="checkout-step-label">
<span class="sr-only">
{% if step.c_is_before %}
{% trans "Completed:" %}
<span class="sr-only">{% trans "Completed:" %}</span>
{% elif request.resolver_match.kwargs.step == step.identifier %}
{% trans "Current:" %}
<span class="sr-only">{% trans "Current:" %}</span>
{% endif %}
</span>
{{ step.label }}
</div>
</a>
{% if step.c_is_before %}</a>{% endif %}
</li>
{% endfor %}
<a class="checkout-step">
<div class="checkout-step-bar-left"></div>
<div class="checkout-step-bar-right"></div>
<li class="checkout-step">
<div class="checkout-step-icon">
<span class="fa fa-ticket" aria-hidden="true"></span>
</div>
<div class="checkout-step-label">
{% trans "Order confirmed" context "checkoutflow" %}
</div>
</a>
</div>
</li>
</ol>
</nav>

View File

@@ -36,34 +36,30 @@
</div>
</div>
{% elif can_download and download_buttons and order.count_positions %}
<div class="alert alert-info info-download">
<div class="info-download">
<h3 class="sr-only">{% trans "Ticket download" %}</h3>
{% if cart.positions|length > 1 and can_download_multi %} {# never True on ticket page #}
{% blocktrans trimmed %}
<div>
{% for b in download_buttons %}
{% if b.multi %}
<form action="{% eventurl event "presale:event.order.download.combined" secret=order.secret order=order.code output=b.identifier %}"
method="post" data-asynctask data-asynctask-download class="download-btn-form">
{% csrf_token %}
<button type="submit"
class="btn btn-lg {% if b.identifier == "pdf" %}btn-primary{% else %}btn-default{% endif %}">
<span class="fa {{ b.icon }}" aria-hidden="true"></span> {{ b.multi_text }}
</button>
</form>
{% endif %}
{% endfor %}
</div>
<p class="help-block">
{% blocktrans trimmed %}
Please have your ticket ready when entering the event.
{% endblocktrans %}
<p class="info-download">
{% trans "Download all tickets at once:" %}
{% for b in download_buttons %}
{% if b.multi %}
<form action="{% eventurl event "presale:event.order.download.combined" secret=order.secret order=order.code output=b.identifier %}"
method="post" data-asynctask data-asynctask-download class="download-btn-form">
{% csrf_token %}
<button type="submit"
class="btn btn-lg {% if b.identifier == "pdf" %}btn-primary{% else %}btn-default{% endif %}">
<span class="fa {{ b.icon }}" aria-hidden="true"></span> {{ b.multi_text }}
</button>
</form>
{% endif %}
{% endfor %}
{% endblocktrans %}
</p>
{% elif tickets_with_download|length == 1 %}
{% blocktrans trimmed %}
Please have your ticket ready when entering the event.
{% endblocktrans %}
{% blocktrans trimmed %}
Download your ticket here:
{% endblocktrans %}
<p class="info-download">
<div>
{% for b in download_buttons %}
<form action="{% if position_page and tickets_with_download.0.addon_to %}{% eventurl event "presale:event.order.position.download" secret=tickets_with_download.0.addon_to.web_secret order=order.code output=b.identifier pid=tickets_with_download.0.pk position=tickets_with_download.0.addon_to.positionid %}{% elif position_page %}{% eventurl event "presale:event.order.position.download" secret=tickets_with_download.0.web_secret order=order.code output=b.identifier pid=tickets_with_download.0.pk position=tickets_with_download.0.positionid %}{% else %}{% eventurl event "presale:event.order.download" secret=order.secret order=order.code output=b.identifier position=tickets_with_download.0.pk %}{% endif %}"
method="post" data-asynctask data-asynctask-download
@@ -75,14 +71,21 @@
</button>
</form>
{% endfor %}
</div>
<p class="help-block">
{% blocktrans trimmed %}
Please have your ticket ready when entering the event.
{% endblocktrans %}
</p>
{% else %}
<p class="text-muted">
{% blocktrans trimmed %}
Please have your ticket ready when entering the event.
{% endblocktrans %}
{% endblocktrans %}<br>
{% blocktrans trimmed %}
Download your tickets using the buttons below.
{% endblocktrans %}
</p>
{% endif %}
</div>
{% elif not download_buttons and ticket_download_date %}

View File

@@ -2,24 +2,27 @@
{% load bootstrap3 %}
{% if order.status == "n" %}
{% if order.require_approval %}
<span class="label label-warning {{ class }}">{% trans "Approval pending" %}</span>
{% trans "Approval pending" %}
{% elif order.total == 0 %}
<span class="label label-warning {{ class }}">{% trans "Confirmation pending" context "order state" %}</span>
{% trans "Confirmation pending" context "order state" %}
{% elif event.settings.payment_pending_hidden %}
{# intentionally left blank #}
{% else %}
<span class="label label-warning {{ class }}">{% trans "Payment pending" %}</span>
{% trans "Payment pending" %}
{% endif %}
{% if not event.settings.payment_pending_hidden %}
<i class="status-dot fa fa-circle text-warning" aria-hidden="true"></i>
{% endif %}
{% elif order.status == "p" %}
{% if order.count_positions == 0 %}
<span class="label label-info {{ class }}">{% trans "Canceled (paid fee)" %}</span>
{% trans "Canceled (paid fee)" %} <i class="status-dot fa fa-info-circle text-info" aria-hidden="true"></i>
{% elif order.total == 0 %}
<span class="label label-success {{ class }}">{% trans "Confirmed" context "order state" %}</span>
{% trans "Confirmed" context "order state" %} <i class="status-dot fa fa-check-circle text-success" aria-hidden="true"></i>
{% else %}
<span class="label label-success {{ class }}">{% trans "Paid" %}</span>
{% trans "Paid" %} <i class="status-dot fa fa-check-circle text-success" aria-hidden="true"></i>
{% endif %}
{% elif order.status == "e" %}
<span class="label label-danger {{ class }}">{% trans "Expired" %}</span>
{% trans "Expired" %} <i class="status-dot fa fa-minus-circle text-danger" aria-hidden="true"></i>
{% elif order.status == "c" %}
<span class="label label-danger {{ class }}">{% trans "Canceled" %}</span>
{% trans "Canceled" %} <i class="status-dot fa fa-times-circle text-danger" aria-hidden="true"></i>
{% endif %}

View File

@@ -6,21 +6,17 @@
{% load eventsignal %}
{% load rich_text %}
{% for tup in items_by_category %}
<section aria-labelledby="category-{% if tup.0 %}{{ tup.0.id }}{% else %}none{% endif %}"{% if tup.0.description %} aria-describedby="category-info-{{ tup.0.id }}"{% endif %}>
<section {% if tup.0 %}aria-labelledby="category-{{ tup.0.id }}"{% else %}aria-label="{% trans "Uncategorized items" %}"{% endif %}{% if tup.0.description %} aria-describedby="category-info-{{ tup.0.id }}"{% endif %}>
{% if tup.0 %}
<h3 id="category-{{ tup.0.id }}">{{ tup.0.name }}</h3>
{% if tup.0.description %}
<div id="category-info-{{ tup.0.id }}">{{ tup.0.description|localize|rich_text }}</div>
{% endif %}
{% else %}
<h3 id="category-none" class="sr-only">{% trans "Uncategorized products" %}</h3>
{% endif %}
{% for item in tup.1 %}
{% if item.has_variations %}
<article class="item-with-variations">
<details {% if event.settings.show_variations_expanded %}open{% endif %}
id="item-{{ item.id }}">
<summary class="row product-row headline">
<article aria-labelledby="item-{{ item.pk }}-legend"{% if item.description %} aria-describedby="item-{{ item.pk }}-description"{% endif %} class="item-with-variations{% if event.settings.show_variations_expanded %} details-open{% endif %}" id="item-{{ item.pk }}">
<div class="row product-row headline">
<div class="col-md-8 col-xs-12">
{% if item.picture %}
<a href="{{ item.picture.url }}" class="productpicture"
@@ -33,13 +29,9 @@
</a>
{% endif %}
<div class="product-description {% if item.picture %}with-picture{% endif %}">
<h4>
<a data-toggle="variations">
{{ item.name }}
</a>
</h4>
<h4 id="item-{{ item.pk }}-legend">{{ item.name }}</h4>
{% if item.description %}
<div class="product-description">
<div id="item-{{ item.pk }}-description" class="product-description">
{{ item.description|localize|rich_text }}
</div>
{% endif %}
@@ -60,9 +52,14 @@
from {{ price }}
{% endblocktrans %}
{% elif item.min_price != item.max_price %}
{{ item.min_price|money:event.currency }} {{ item.max_price|money:event.currency }}
<span class="sr-only">
{% blocktrans trimmed with from_price=item.min_price|money:event.currency to_price=item.max_price|money:event.currency %}
from {{ from_price }} to {{ to_price }}
{% endblocktrans %}
</span>
<span aria-hidden="true">{{ item.min_price|money:event.currency }} {{ item.max_price|money:event.currency }}</span>
{% elif not item.min_price and not item.max_price %}
{% trans "FREE" context "price" %}
<span class="text-uppercase">{% trans "free" context "price" %}</span>
{% else %}
{{ item.min_price|money:event.currency }}
{% endif %}
@@ -88,24 +85,23 @@
{% endif %}
<br>
{% endif %}
<a data-toggle="variations" class="js-only">
<button type="button" data-toggle="variations" class="btn btn-default btn-block js-only"
data-label-alt="{% trans "Hide variants" %}"
aria-expanded="false"
aria-label="{% blocktrans trimmed with item=item.name count=item.available_variations|length %}Show {{count}} variants of {{ item }}{% endblocktrans %}">
{% trans "Show variants" %}
</a>
</button>
{% endif %}
</div>
<div class="clearfix"></div>
</summary>
</div>
<div class="variations {% if not event.settings.show_variations_expanded %}variations-collapsed{% endif %}">
{% for var in item.available_variations %}
<article class="row product-row variation">
<article aria-labelledby="item-{{ item.pk }}-{{ var.pk }}-legend"{% if var.description %} aria-describedby="item-{{ item.pk }}-{{ var.pk }}-description"{% endif %} class="row product-row variation" id="item-{{ item.pk }}-{{ var.pk }}">
<div class="col-md-8 col-xs-12">
<h5>
<label for="variation_{{ item.pk }}_{{ var.pk }}">
{{ var }}
</label>
</h5>
<h5 id="item-{{ item.pk }}-{{ var.pk }}-legend">{{ var }}</h5>
{% if var.description %}
<div class="variation-description">
<div id="item-{{ item.pk }}-{{ var.pk }}-description" class="variation-description">
{{ var.description|localize|rich_text }}
</div>
{% endif %}
@@ -115,12 +111,21 @@
</div>
<div class="col-md-2 col-xs-6 price">
{% if var.original_price %}
<p>
<del><span class="sr-only">{% trans "Orignal price:" %}</span>
{% if event.settings.display_net_prices %}
<del>{{ var.original_price.net|money:event.currency }}</del>
{{ var.original_price.net|money:event.currency }}
{% else %}
<del>{{ var.original_price.gross|money:event.currency }}</del>
{{ var.original_price.gross|money:event.currency }}
{% endif %}
<ins>
</del>
{% if item.free_price %}
</p>
{% else %}
<ins><span class="sr-only">{% trans "New price:" %}</span>
{% endif %}
{% elif not item.free_price %}
<p>
{% endif %}
{% if item.free_price %}
<label class="sr-only" for="price-variation-{{ item.pk }}-{{ var.pk }}">{% blocktrans trimmed with item=var.value %}Modify price for {{ item }}{% endblocktrans %}</label>
@@ -137,9 +142,10 @@
value="{% if event.settings.display_net_prices %}{{ var.display_price.net|money_numberfield:event.currency }}{% else %}{{ var.display_price.gross|money_numberfield:event.currency }}{% endif %}"
>
</div>
<p>
{% elif not var.display_price.gross %}
{% trans "FREE" context "price" %}
{% elif event.settings.display_net_prices %}
{% elif event.settings.display_net_prices %}
{{ var.display_price.net|money:event.currency }}
{% else %}
{{ var.display_price.gross|money:event.currency }}
@@ -162,12 +168,11 @@
incl. {{ rate }}% {{ name }}
{% endblocktrans %}</small>
{% endif %}
</p>
</div>
{% if item.require_voucher %}
<div class="col-md-2 col-xs-6 availability-box unavailable">
<small>
<a href="#voucher">{% trans "Enter a voucher code below to buy this ticket." %}</a>
</small>
<p><small><a href="#voucher">{% trans "Enter a voucher code below to buy this ticket." %}</a></small></p>
</div>
{% elif var.cached_availability.0 == 100 %}
<div class="col-md-2 col-xs-6 availability-box available">
@@ -177,15 +182,15 @@
{% if not ev.presale_is_running %}disabled{% endif %}
id="variation_{{ item.id }}_{{ var.id }}"
name="variation_{{ item.id }}_{{ var.id }}"
title="{% blocktrans with item=item.name var=var.name %}Amount of {{ item }} {{ var }} to order{% endblocktrans %}">
title="{% blocktrans with item=item.name var=var.name %}Do you want to order {{ item }}, {{ var }}?{% endblocktrans %}">
</label>
{% else %}
<input type="number" class="form-control input-item-count" placeholder="0" min="0"
{% if not ev.presale_is_running %}disabled{% endif %}
max="{{ var.order_max }}"
pattern="\d*"
id="variation_{{ item.id }}_{{ var.id }}"
name="variation_{{ item.id }}_{{ var.id }}">
name="variation_{{ item.id }}_{{ var.id }}"
aria-label="{% blocktrans with item=item.name var=var.name %}Quantity of {{ item }}, {{ var }} to order{% endblocktrans %}">
{% endif %}
</div>
{% else %}
@@ -195,10 +200,9 @@
</article>
{% endfor %}
</div>
</details>
</article>
{% else %}
<article class="row product-row simple" id="item-{{ item.id }}">
<article aria-labelledby="item-{{ item.pk }}-legend"{% if item.description %} aria-describedby="item-{{ item.pk }}-description"{% endif %} class="row product-row simple" id="item-{{ item.pk }}">
<div class="col-md-8 col-xs-12">
{% if item.picture %}
<a href="{{ item.picture.url }}" class="productpicture"
@@ -211,11 +215,9 @@
</a>
{% endif %}
<div class="product-description {% if item.picture %}with-picture{% endif %}">
<h4>
<label for="item_{{ item.pk }}">{{ item.name }}</label>
</h4>
<h4 id="item-{{ item.pk }}-legend">{{ item.name }}</h4>
{% if item.description %}
<div class="product-description">
<div id="item-{{ item.pk }}-description" class="product-description">
{{ item.description|localize|rich_text }}
</div>
{% endif %}
@@ -235,17 +237,26 @@
</div>
<div class="col-md-2 col-xs-6 price">
{% if item.original_price %}
<p>
<del><span class="sr-only">{% trans "Orignal price:" %}</span>
{% if event.settings.display_net_prices %}
<del>{{ item.original_price.net|money:event.currency }}</del>
{{ item.original_price.net|money:event.currency }}
{% else %}
<del>{{ item.original_price.gross|money:event.currency }}</del>
{{ item.original_price.gross|money:event.currency }}
{% endif %}
<ins>
</del>
{% if item.free_price %}
</p>
{% else %}
<ins><span class="sr-only">{% trans "New price:" %}</span>
{% endif %}
{% elif not item.free_price %}
<p>
{% endif %}
{% if item.free_price %}
<div class="input-group input-group-price">
<label class="sr-only" for="price-item-{{ item.pk }}">{% blocktrans trimmed with item=item.name %}Modify price for {{ item }}{% endblocktrans %}</label>
<span class="input-group-addon">{{ event.currency }}</span>
<label class="sr-only" for="price-item-{{ item.pk }}">{% blocktrans trimmed with item=item.name currency=event.currency %}Set price in {{ currency }} for {{ item }}{% endblocktrans %}</label>
<span class="input-group-addon" aria-hidden="true">{{ event.currency }}</span>
<input type="number" class="form-control input-item-price" placeholder="0"
id="price-item-{{ item.pk }}"
{% if not ev.presale_is_running %}disabled{% endif %}
@@ -255,9 +266,10 @@
value="{% if event.settings.display_net_prices %}{{ item.display_price.net|money_numberfield:event.currency }}{% else %}{{ item.display_price.gross|money_numberfield:event.currency }}{% endif %}"
step="any">
</div>
<p>
{% elif not item.display_price.gross %}
{% trans "FREE" context "price" %}
{% elif event.settings.display_net_prices %}
{% elif event.settings.display_net_prices %}
{{ item.display_price.net|money:event.currency }}
{% else %}
{{ item.display_price.gross|money:event.currency }}
@@ -280,12 +292,11 @@
incl. {{ rate }}% {{ name }}
{% endblocktrans %}</small>
{% endif %}
</p>
</div>
{% if item.require_voucher %}
<div class="col-md-2 col-xs-6 availability-box unavailable">
<small>
{% trans "Enter a voucher code below to buy this ticket." %}
</small>
<p><small><a href="#voucher">{% trans "Enter a voucher code below to buy this ticket." %}</a></small></p>
</div>
{% elif item.cached_availability.0 == 100 %}
<div class="col-md-2 col-xs-6 availability-box available">
@@ -293,16 +304,19 @@
<label class="item-checkbox-label">
<input type="checkbox" value="1" {% if itemnum == 1 %}checked{% endif %}
{% if not ev.presale_is_running %}disabled{% endif %}
name="item_{{ item.id }}" id="item_{{ item.id }}">
name="item_{{ item.id }}" id="item_{{ item.id }}"
aria-label="{% blocktrans with item=item.name %}Add {{ item }} to cart{% endblocktrans %}"
{% if item.description %} aria-describedby="item-{{ item.id }}-description"{% endif %}>
</label>
{% else %}
<input type="number" class="form-control input-item-count" placeholder="0" min="0"
{% if not ev.presale_is_running %}disabled{% endif %}
pattern="\d*" {% if itemnum == 1 %}value="1"{% endif %}
{% if itemnum == 1 %}value="1"{% endif %}
max="{{ item.order_max }}"
name="item_{{ item.id }}"
id="item_{{ item.id }}"
title="{% blocktrans with item=item.name %}Amount of {{ item }} to order{% endblocktrans %}">
aria-label="{% blocktrans with item=item.name %}Quantity of {{ item }} to order{% endblocktrans %}"
{% if item.description %} aria-describedby="item-{{ item.id }}-description"{% endif %}>
{% endif %}
</div>
{% else %}

View File

@@ -1,41 +1,46 @@
{% load i18n %}
{% load eventurl %}
{% load urlreplace %}
<form class="form-inline" method="get" id="monthselform" action="{% eventurl event "presale:event.index" cart_namespace=cart_namespace %}">
{% for f, v in request.GET.items %}
{% if f != "month" and f != "year" %}
<input type="hidden" name="{{ f }}" value="{{ v }}">
{% endif %}
{% endfor %}
<div class="row">
<div class="col-sm-4 hidden-xs text-left flip">
<nav aria-label="{% trans "calendar navigation" %}">
<ul class="row calendar-nav">
<li class="col-sm-4 hidden-xs text-left flip">
<a href="?{% url_replace request "year" subevent_list.before.year "month" subevent_list.before.month %}"
class="btn btn-default">
class="btn btn-default" aria-label="{% blocktrans with month=subevent_list.before|date:"F Y" %}Show previous month, {{ month }}{% endblocktrans %}">
<span class="fa fa-arrow-left" aria-hidden="true"></span>
{{ subevent_list.before|date:"F Y" }}
</a>
</div>
<div class="col-sm-4 col-xs-12 text-center">
<select name="month" class="form-control">
{% for m in subevent_list.months %}
<option value="{{ m|date:"m" }}" {% if m.month == subevent_list.date.month %}selected{% endif %}>{{ m|date:"F" }}</option>
</li>
<li class="col-sm-4 col-xs-12 text-center">
<form class="form-inline" method="get" id="monthselform" action="{% eventurl event "presale:event.index" cart_namespace=cart_namespace %}">
{% for f, v in request.GET.items %}
{% if f != "month" and f != "year" %}
<input type="hidden" name="{{ f }}" value="{{ v }}">
{% endif %}
{% endfor %}
</select>
<select name="year" class="form-control">
{% for y in subevent_list.years %}
<option value="{{ y }}" {% if y == subevent_list.date.year %}selected{% endif %}>{{ y }}</option>
{% endfor %}
</select>
<button type="submit" class="js-hidden btn btn-default">
{% trans "Go" %}
</button>
</div>
<div class="col-sm-4 hidden-xs text-right flip">
<a href="?{% url_replace request "year" subevent_list.after.year "month" subevent_list.after.month %}" class="btn btn-default">
<div role="group" aria-label="{% trans "Select month and year to show" %}">
<select name="month" class="form-control" aria-label="{% trans "Month" %}">
{% for m in subevent_list.months %}
<option value="{{ m|date:"m" }}" {% if m.month == subevent_list.date.month %}selected{% endif %}>{{ m|date:"F" }}</option>
{% endfor %}
</select>
<select name="year" class="form-control" aria-label="{% trans "Year" %}">
{% for y in subevent_list.years %}
<option value="{{ y }}" {% if y == subevent_list.date.year %}selected{% endif %}>{{ y }}</option>
{% endfor %}
</select>
</div>
<button type="submit" class="js-hidden btn btn-default">
{% trans "Go" %}
</button>
</form>
</li>
<li class="col-sm-4 hidden-xs text-right flip">
<a href="?{% url_replace request "year" subevent_list.after.year "month" subevent_list.after.month %}"
class="btn btn-default" aria-label="{% blocktrans with month=subevent_list.after|date:"F Y" %}Show next month, {{ month }}{% endblocktrans %}">
{{ subevent_list.after|date:"F Y" }}
<span class="fa fa-arrow-right" aria-hidden="true"></span>
</a>
</div>
</div>
</form>
</li>
</ul>
</nav>
{% include "pretixpresale/fragment_calendar.html" with show_avail=event.settings.event_list_availability weeks=subevent_list.weeks show_names=subevent_list.show_names %}

View File

@@ -1,46 +1,50 @@
{% load i18n %}
{% load eventurl %}
{% load urlreplace %}
<form class="form-inline" method="get" id="monthselform" action="{% eventurl event "presale:event.index" cart_namespace=cart_namespace %}">
{% for f, v in request.GET.items %}
{% if f != "week" and f != "year" %}
<input type="hidden" name="{{ f }}" value="{{ v }}">
{% endif %}
{% endfor %}
<div class="row">
<div class="col-sm-4 hidden-xs text-left flip">
<nav aria-label="{% trans "calendar navigation" %}">
<ul class="row calendar-nav">
<li class="col-sm-4 hidden-xs text-left flip">
<a href="?{% url_replace request "year" subevent_list.before.isocalendar.0 "week" subevent_list.before.isocalendar.1 %}"
class="btn btn-default">
class="btn btn-default" aria-label="{% blocktrans with week=subevent_list.before|date:subevent_list.week_format %}Show previous week, {{ week }}{% endblocktrans %}">
<span class="fa fa-arrow-left" aria-hidden="true"></span>
{{ before|date:subevent_list.week_format }}
{{ subevent_list.before|date:subevent_list.week_format }}
</a>
</div>
<div class="col-sm-4 col-xs-12 text-center">
<select name="week" class="form-control select-calendar-week-short">
{% for w in subevent_list.weeks %}
<option value="{{ w.0.isocalendar.1 }}" {% if w.0.isocalendar.1 == subevent_list.date.isocalendar.1 %}selected{% endif %}>{% trans "W" %} {{ w.0.isocalendar.1 }} ({{ w.0|date:"SHORT_DATE_FORMAT" }} {{ w.1|date:"SHORT_DATE_FORMAT" }})</option>
{% endfor %}
</select>
<select name="year" class="form-control">
{% for y in subevent_list.years %}
<option value="{{ y }}" {% if y == subevent_list.date.isocalendar.0 %}selected{% endif %}>{{ y }}</option>
{% endfor %}
</select>
<button type="submit" class="js-hidden btn btn-default">
{% trans "Go" %}
</button>
</div>
<div class="col-sm-4 hidden-xs text-right flip">
</li>
<li class="col-sm-4 col-xs-12 text-center">
<form class="form-inline" method="get" id="monthselform" action="{% eventurl event "presale:event.index" cart_namespace=cart_namespace %}">
{% for f, v in request.GET.items %}
{% if f != "week" and f != "year" %}
<input type="hidden" name="{{ f }}" value="{{ v }}">
{% endif %}
{% endfor %}
<div role="group" aria-label="{% trans "Select week and year to show" %}">
<select name="week" class="form-control select-calendar-week-short" aria-label="{% trans "Week" %}">
{% for w in subevent_list.weeks %}
<option value="{{ w.0.isocalendar.1 }}" {% if w.0.isocalendar.1 == subevent_list.date.isocalendar.1 %}selected{% endif %}>{% trans "W" %} {{ w.0.isocalendar.1 }} ({{ w.0|date:"SHORT_DATE_FORMAT" }} {{ w.1|date:"SHORT_DATE_FORMAT" }})</option>
{% endfor %}
</select>
<select name="year" class="form-control" aria-label="{% trans "Year" %}">
{% for y in subevent_list.years %}
<option value="{{ y }}" {% if y == subevent_list.date.isocalendar.0 %}selected{% endif %}>{{ y }}</option>
{% endfor %}
</select>
</div>
<button type="submit" class="js-hidden btn btn-default">
{% trans "Go" %}
</button>
</form>
</li>
<li class="col-sm-4 hidden-xs text-right flip">
<a href="?{% url_replace request "year" subevent_list.after.isocalendar.0 "week" subevent_list.after.isocalendar.1 %}"
class="btn btn-default">
class="btn btn-default" aria-label="{% blocktrans with week=subevent_list.after|date:subevent_list.week_format %}Show next week, {{ week }}{% endblocktrans %}">
{{ subevent_list.after|date:subevent_list.week_format }}
<span class="fa fa-arrow-right" aria-hidden="true"></span>
</a>
</div>
</div>
</form>
</li>
</ul>
</nav>
{% include "pretixpresale/fragment_week_calendar.html" with show_avail=event.settings.event_list_availability days=subevent_list.days show_names=subevent_list.show_names %}
<div class="col-sm-4 visible-xs text-center">
<div class="col-sm-4 visible-xs text-center" aria-hidden="true">
<a href="?{% url_replace request "year" subevent_list.before.isocalendar.0 "week" subevent_list.before.isocalendar.1 %}"
class="btn btn-default">
<span class="fa fa-arrow-left" aria-hidden="true"></span>

View File

@@ -1,19 +1,20 @@
{% load i18n %}
{% load eventurl %}
<ul class="list-unstyled">
{% for subev in subevent_list.subevent_list %}
<a href="{% if request.GET.voucher %}{% eventurl event "presale:event.redeem" cart_namespace=cart_namespace %}?voucher={{ request.GET.voucher|urlencode }}&subevent={{ subev.pk }}{% else %}{% eventurl event "presale:event.index" subevent=subev.id cart_namespace=cart_namespace %}{% endif %}"
class="subevent-row">
<li class="subevent-row">
<a href="{% if request.GET.voucher %}{% eventurl event "presale:event.redeem" cart_namespace=cart_namespace %}?voucher={{ request.GET.voucher|urlencode }}&subevent={{ subev.pk }}{% else %}{% eventurl event "presale:event.index" subevent=subev.id cart_namespace=cart_namespace %}{% endif %}">
<div class="row">
<div class="col-md-6">
<strong>{{ subev.name }}</strong>
</div>
<div class="col-md-4">
<span class="fa fa-calendar" aria-hidden="true"></span>
{{ subev.get_date_range_display }}
{{ subev.get_date_range_display_as_html }}
{% if event.settings.show_times %}
<span data-time="{{ subev.date_from.isoformat }}" data-timezone="{{ event.timezone }}" data-time-short>
<span class="fa fa-clock-o" aria-hidden="true"></span>
{{ subev.date_from|date:"TIME_FORMAT" }}
<time datetime="{{ subev.date_from.isoformat }}">{{ subev.date_from|date:"TIME_FORMAT" }}</time>
</span>
{% endif %}
</div>
@@ -47,5 +48,7 @@
{% endif %}
</div>
</div>
</a>
</a>
</li>
{% endfor %}
</ul>

View File

@@ -8,6 +8,22 @@
{% load eventsignal %}
{% load rich_text %}
{% block title %}
{% if "year" in request.GET %}
{% if list_type == "calendar" %}
{% blocktrans with datetime=date|date:"F Y" %}
Calendar for {{ datetime }}
{% endblocktrans %} ::
{% elif list_type == "week" %}
{% blocktrans with datetime=date|date:week_format %}
Calendar for {{ datetime }}
{% endblocktrans %} ::
{% endif %}
{% elif subevent %}
{{ subevent.get_date_range_display }} ::
{% endif %}
{% endblock %}
{% block custom_header %}
{{ block.super }}
<meta property="og:title" content="{{ ev.name }}" />
@@ -45,22 +61,24 @@
{% if request.GET.voucher %}
<div class="alert alert-info">
{% trans "Please select a date to redeem your voucher." %}
<p>{% trans "Please select a date to redeem your voucher." %}</p>
</div>
{% endif %}
{% endif %}
{% if subevent and "year" not in request.GET %}
<p>
{% if show_cart %}
<a class="subevent-toggle btn btn-primary btn-block btn-lg" href="#subevent-list">
<button class="subevent-toggle btn btn-primary btn-block btn-lg" aria-expanded="false">
<span class="fa fa-reply" aria-hidden="true"></span>
{% trans "Add tickets for a different date" %}
</a>
</button>
{% else %}
<a class="subevent-toggle btn btn-default btn-block" href="#subevent-list">
<button class="subevent-toggle btn btn-default btn-block" aria-expanded="false">
{% trans "View other date" %}
</a>
</button>
{% endif %}
</p>
{% else %}
<h3>{% trans "Choose date to book a ticket" %}</h3>
{% endif %}
@@ -99,7 +117,7 @@
<h2 class="content-header">
{{ event.name }}
{% if request.event.settings.show_dates_on_frontpage %}
<small>{{ event.get_date_range_display }}</small>
<small>{{ event.get_date_range_display_as_html }}</small>
{% endif %}
</h2>
{% endif %}
@@ -122,11 +140,15 @@
{% endblocktrans %}
{% endif %}
{% elif event.settings.presale_start_show_date %}
<span data-time="{{ ev.effective_presale_start.isoformat }}" data-timezone="{{ request.event.timezone }}">
{% blocktrans trimmed with date=ev.effective_presale_start|date:"SHORT_DATE_FORMAT" time=ev.effective_presale_start|time:"TIME_FORMAT" %}
The presale for this event will start on {{ date }} at {{ time }}.
{% endblocktrans %}
</span>
{% with date=ev.effective_presale_start|date:"SHORT_DATE_FORMAT" date_normalized=ev.effective_presale_start|date:"Y-m-d" %}
{% with time=ev.effective_presale_start|time:"TIME_FORMAT" time_24h=ev.effective_presale_start|time:"H:i" %}
<span data-time="{{ ev.effective_presale_start.isoformat }}" data-timezone="{{ request.event.timezone }}">
{% blocktrans trimmed with date="<time datetime='"|add:date_normalized|add:"'>"|add:date|add:"</time>"|safe time="<time datetime='"|add:time_24h|add:"'>"|add:time|add:"</time>"|safe %}
The presale for this event will start on {{ date }} at {{ time }}.
{% endblocktrans %}
</span>
{% endwith %}
{% endwith %}
{% else %}
{% blocktrans trimmed %}
The presale for this event has not yet started.
@@ -138,46 +160,54 @@
<div>
{% if ev.location %}
<div class="info-row">
<span class="fa fa-map-marker fa-fw" aria-hidden="true"></span>
<p><span class="sr-only">{% trans "Location" %}:</span>
<span class="fa fa-map-marker fa-fw" aria-hidden="true" title="{% trans "Where does the event happen?" %}"></span>
<p><span class="sr-only">{% trans "Where does the event happen?" %}</span>
{{ ev.location|linebreaksbr }}
</p>
</div>
{% endif %}
{% if ev.settings.show_dates_on_frontpage %}
<div class="info-row">
<span class="fa fa-clock-o fa-fw" aria-hidden="true"></span>
<p>
{{ ev.get_date_range_display }}
<span class="fa fa-clock-o fa-fw" aria-hidden="true" title="{% trans "When does the event happen?" %}"></span>
<p><span class="sr-only">{% trans "When does the event happen?" %}</span>
{{ ev.get_date_range_display_as_html }}
{% if event.settings.show_times %}
<br>
<span data-time="{{ ev.date_from.isoformat }}" data-timezone="{{ request.event.timezone }}">
{% blocktrans trimmed with time=ev.date_from|date:"TIME_FORMAT" %}
{% with time_human=ev.date_from|date:"TIME_FORMAT" time_24=ev.date_from|time:"H:i" %}
{% blocktrans trimmed with time='<time datetime="'|add:time_24|add:'">'|add:time_human|add:"</time>"|safe %}
Begin: {{ time }}
{% endblocktrans %}
{% endwith %}
</span>
{% if event.settings.show_date_to and ev.date_to %}
<br>
<span data-time="{{ ev.date_to.isoformat }}" data-timezone="{{ request.event.timezone }}">
{% blocktrans trimmed with time=ev.date_to|date:"TIME_FORMAT" %}
{% with time_human=ev.date_to|date:"TIME_FORMAT" time_24=ev.date_to|time:"H:i" %}
{% blocktrans trimmed with time='<time datetime="'|add:time_24|add:'">'|add:time_human|add:"</time>"|safe %}
End: {{ time }}
{% endblocktrans %}
{% endwith %}
</span>
{% endif %}
{% endif %}
{% if ev.date_admission %}
<br>
{% if ev.date_admission|date:"SHORT_DATE_FORMAT" == ev.date_from|date:"SHORT_DATE_FORMAT" %}
<span data-time="{{ ev.date_admission.isoformat }}" data-timezone="{{ request.event.timezone }}">
{% blocktrans trimmed with time=ev.date_admission|date:"TIME_FORMAT" %}
<span data-time="{{ ev.date_admission.isoformat }}" data-timezone="{{ request.event.timezone }}">
{% with time_human=ev.date_admission|date:"TIME_FORMAT" time_24=ev.date_admission|time:"H:i" %}
{% blocktrans trimmed with time='<time datetime="'|add:time_24|add:'">'|add:time_human|add:"</time>"|safe %}
Admission: {{ time }}
{% endblocktrans %}
{% endwith %}
</span>
{% else %}
<span data-time="{{ ev.date_admission.isoformat }}" data-timezone="{{ request.event.timezone }}">
{% blocktrans trimmed with datetime=ev.date_admission|date:"SHORT_DATETIME_FORMAT" %}
{% with datetime_human=ev.date_admission|date:"SHORT_DATETIME_FORMAT" datetime_iso=ev.date_admission|time:"Y-m-d H:i" %}
{% blocktrans trimmed with datetime='<time datetime="'|add:datetime_iso|add:'">'|add:datetime_human|add:"</time>"|safe %}
Admission: {{ datetime }}
{% endblocktrans %}
{% endwith %}
</span>
{% endif %}
{% endif %}
@@ -239,7 +269,7 @@
{% include "pretixpresale/event/fragment_product_list.html" %}
{% if ev.presale_is_running and display_add_to_cart %}
<section class="front-page">
<div class="front-page">
<div class="row">
<div class="col-md-4 col-md-offset-8 col-xs-12">
<button class="btn btn-block btn-primary btn-lg" type="submit" id="btn-add-to-cart">
@@ -256,7 +286,7 @@
</div>
<div class="clearfix"></div>
</div>
</section>
</div>
{% endif %}
</form>
{% endif %}
@@ -273,11 +303,14 @@
<form method="get" action="{% eventurl event "presale:event.redeem" cart_namespace=cart_namespace %}">
<div class="row row-voucher">
<div class="col-md-8 col-sm-6 col-xs-12">
<label for="voucher" class="sr-only">{% trans "Voucher code" %}</label>
<div class="input-group">
<label for="voucher" class="sr-only">{% trans "Voucher code" %}
{% if "voucher_invalid" in request.GET %}<strong>{% trans "has error" context "form" %},</strong>{% endif %}
<i>{% trans "required" context "form" %}</i></label>
<div class="input-group{% if "voucher_invalid" in request.GET %} has-error{% endif %}">
<span class="input-group-addon"><i class="fa fa-ticket fa-fw" aria-hidden="true"></i></span>
<input type="text" class="form-control" name="voucher" id="voucher"
placeholder="{% trans "Voucher code" %}">
<input type="text" class="form-control{% if "voucher_invalid" in request.GET %} has-error{% endif %}" name="voucher" id="voucher"
{% if "voucher_invalid" in request.GET %} aria-describedby="error-message"{% endif %}
placeholder="{% trans "Voucher code" %}" required="required">
</div>
</div>
<input type="hidden" name="subevent" value="{{ subevent.id|default_if_none:"" }}" />

View File

@@ -26,9 +26,9 @@
<div class="thank-you">
<span class="fa fa-check-circle" aria-hidden="true"></span>
<h2>{% trans "Thank you!" %}</h2>
<h2 class="h1">{% trans "Thank you!" %}</h2>
{% if order.status != 'p' %}
<p>
<p class="lead">
{% trans "Your order has been placed successfully. See below for details." %}<br>
{% if order.require_approval and order.total == 0 %}
<strong>
@@ -45,9 +45,9 @@
{% endif %}
</p>
{% elif order.total == 0 %}
<p>{% trans "Your order has been processed successfully! See below for details." %}</p>
<p class="lead">{% trans "Your order has been processed successfully! See below for details." %}</p>
{% else %}
<p>{% trans "We successfully received your payment. See below for details." %}</p>
<p class="lead">{% trans "We successfully received your payment. See below for details." %}</p>
{% endif %}
{% if request.event.settings.checkout_success_text %}
{{ request.event.settings.checkout_success_text|rich_text }}
@@ -60,13 +60,10 @@
also sent you an email containing the link to the address you specified.
{% endblocktrans %}<br>
<code>{{ url }}</code></p>
<div class="clearfix"></div>
</div>
{% endif %}
<h2>
{% blocktrans trimmed with code=order.code %}
Your order: {{ code }}
{% endblocktrans %}
<h2 class="h1">{% trans "Order" %} {{ order.code }}
{% if order.testmode %}
<span class="label label-warning">{% trans "TEST MODE" %}</span>
{% endif %}
@@ -75,9 +72,11 @@
{% trans "View in backend" %}
</a>
{% endif %}
{% include "pretixpresale/event/fragment_order_status.html" with order=order event=request.event class="pull-right flip" %}
<div class="clearfix"></div>
</h2>
<dl class="lead order-details">
<dt class="sr-only">Status</dt>
<dd class="text-muted">{% include "pretixpresale/event/fragment_order_status.html" with order=order event=request.event %}</dd>
</dl>
{% if order.status == "n" and not order.require_approval %}
<div class="panel panel-primary">
<div class="panel-heading">
@@ -86,12 +85,18 @@
</h3>
</div>
<div class="panel-body">
<p>
<strong>{% blocktrans trimmed with total=pending_sum|money:request.event.currency %}
A payment of {{ total }} is still pending for this order.
{% endblocktrans %}</strong>
<strong>{% blocktrans trimmed with date=order|format_expires %}
Please complete your payment before {{ date }}
{% endblocktrans %}</strong>
<strong>
{% with date_human=order|format_expires|safe date_iso=order.expires|date:"c" %}
{% blocktrans trimmed with date='<time datetime="'|add:date_iso|add:'">'|add:date_human|add:"</time>"|safe %}
Please complete your payment before {{ date }}
{% endblocktrans %}
{% endwith %}
</strong>
</p>
{% if last_payment %}
{{ last_payment_info }}
{% if can_pay %}
@@ -356,11 +361,13 @@
If you want to make changes to the products you bought, you can click on the button to change your order.
{% endblocktrans %}
</p>
<p>
<a href="{% eventurl event 'presale:event.order.change' secret=order.secret order=order.code %}"
class="btn btn-default">
<span class="fa fa-edit" aria-hidden="true"></span>
{% trans "Change order" %}
</a>
</p>
</li>
{% endif %}
{% if user_cancel_allowed %}
@@ -424,11 +431,13 @@
{% trans "This will invalidate all tickets in this order." %}
</p>
{% endif %}
<p>
<a href="{% eventurl event 'presale:event.order.cancel' secret=order.secret order=order.code %}"
class="btn btn-danger">
<span class="fa fa-remove" aria-hidden="true"></span>
{% trans "Cancel order" %}
</a>
</p>
{% else %}
<p>
{% blocktrans trimmed %}
@@ -436,11 +445,13 @@
{% endblocktrans %}
{% trans "This will invalidate all tickets in this order." %}
</p>
<p>
<a href="{% eventurl event 'presale:event.order.cancel' secret=order.secret order=order.code %}"
class="btn btn-danger">
<span class="fa fa-remove" aria-hidden="true"></span>
{% trans "Cancel order" %}
</a>
</p>
{% endif %}
</li>
{% endif %}

View File

@@ -30,7 +30,7 @@
</label>
<div class="col-md-9 form-control-text">
<ul class="addon-list">
{{ pos.subevent.name }} &middot; {{ pos.subevent.get_date_range_display }}
{{ pos.subevent.name }} &middot; {{ pos.subevent.get_date_range_display_as_html }}
{% if pos.event.settings.show_times %}
<span class="fa fa-clock-o" aria-hidden="true"></span>
{{ pos.subevent.date_from|date:"TIME_FORMAT" }}

View File

@@ -6,7 +6,7 @@
{% load eventurl %}
{% block title %}{% trans "Registration details" %}{% endblock %}
{% block content %}
<h2>
<h2 class="h1">
{% blocktrans trimmed %}
Your registration
{% endblocktrans %}
@@ -18,9 +18,11 @@
{% trans "View in backend" %}
</a>
{% endif %}
{% include "pretixpresale/event/fragment_order_status.html" with order=order event=request.event class="pull-right flip" %}
<div class="clearfix"></div>
</h2>
<dl class="lead order-details">
<dt class="sr-only">Status</dt>
<dd class="text-muted">{% include "pretixpresale/event/fragment_order_status.html" with order=order event=request.event %}</dd>
</dl>
{% eventsignal event "pretix.presale.signals.position_info_top" order=order position=position request=request %}
{% include "pretixpresale/event/fragment_downloads.html" with position_page=True %}
<div class="panel panel-primary cart">

View File

@@ -26,29 +26,37 @@
<div class="info-row">
<span class="fa fa-clock-o fa-fw" aria-hidden="true"></span>
<p>
{{ ev.get_date_range_display }}
{{ ev.get_date_range_display_as_html }}
{% if event.settings.show_times %}
<br>
{% blocktrans trimmed with time=ev.date_from|date:"TIME_FORMAT" %}
Begin: {{ time }}
{% endblocktrans %}
{% with time_human=ev.date_from|date:"TIME_FORMAT" time_24=ev.date_from|time:"H:i" %}
{% blocktrans trimmed with time='<time datetime="'|add:time_24|add:'">'|add:time_human|add:"</time>"|safe %}
Begin: {{ time }}
{% endblocktrans %}
{% endwith %}
{% if event.settings.show_date_to and ev.date_to %}
<br>
{% blocktrans trimmed with time=ev.date_to|date:"TIME_FORMAT" %}
End: {{ time }}
{% endblocktrans %}
{% with time_human=ev.date_to|date:"TIME_FORMAT" time_24=ev.date_to|time:"H:i" %}
{% blocktrans trimmed with time='<time datetime="'|add:time_24|add:'">'|add:time_human|add:"</time>"|safe %}
End: {{ time }}
{% endblocktrans %}
{% endwith %}
{% endif %}
{% endif %}
{% if ev.date_admission %}
<br>
{% if ev.date_admission|date:"SHORT_DATE_FORMAT" == ev.date_from|date:"SHORT_DATE_FORMAT" %}
{% blocktrans trimmed with time=ev.date_admission|date:"TIME_FORMAT" %}
Admission: {{ time }}
{% endblocktrans %}
{% with time_human=ev.date_admission|date:"TIME_FORMAT" time_24=ev.date_admission|time:"H:i" %}
{% blocktrans trimmed with time='<time datetime="'|add:time_24|add:'">'|add:time_human|add:"</time>"|safe %}
Admission: {{ time }}
{% endblocktrans %}
{% endwith %}
{% else %}
{% blocktrans trimmed with datetime=ev.date_admission|date:"SHORT_DATETIME_FORMAT" %}
Admission: {{ datetime }}
{% endblocktrans %}
{% with datetime_human=ev.date_admission|date:"SHORT_DATETIME_FORMAT" datetime_iso=ev.date_admission|time:"Y-m-d H:i" %}
{% blocktrans trimmed with datetime='<time datetime="'|add:datetime_iso|add:'">'|add:datetime_human|add:"</time>"|safe %}
Admission: {{ datetime }}
{% endblocktrans %}
{% endwith %}
{% endif %}
{% endif %}
<br>
@@ -215,7 +223,6 @@
</label>
{% else %}
<input type="number" class="form-control input-item-count" placeholder="0" min="0"
pattern="\d*"
max="{{ item.order_max }}"
id="variation_{{ item.id }}_{{ var.id }}"
name="variation_{{ item.id }}_{{ var.id }}"
@@ -324,7 +331,6 @@
</label>
{% else %}
<input type="number" class="form-control input-item-count" placeholder="0" min="0"
pattern="\d*"
max="{{ item.order_max }}"
id="item_{{ item.id }}"
name="item_{{ item.id }}"

View File

@@ -3,14 +3,21 @@
{% block title %}{% trans "Waiting list" %}{% endblock %}
{% block content %}
<h2>{% trans "Add me to the waiting list" %}</h2>
<form action="" method="post">
<form action="{{ request.get_full_path }}" method="post">
{% csrf_token %}
<div class="form-horizontal">
<div class="form-group">
<label class="col-md-3 control-label" for="input_product">{% trans "Product" %}</label>
<div class="col-md-9">
<input id="input_product" class="form-control" readonly="readonly"
value="{{ item.name }}{% if variation %} {{ variation.value }}{% endif %}">
</div>
</div>
{% if subevent %}
<div class="form-group">
<label class="col-md-3 control-label" for="id_email">{% trans "Event" %}</label>
<label class="col-md-3 control-label" for="input_subevent">{% trans "Event" %}</label>
<div class="col-md-9">
<input class="form-control" readonly="readonly"
<input id="input_subevent" class="form-control" readonly="readonly"
value="{{ subevent.name }} {{ subevent.get_date_range_display }}">
</div>
</div>
@@ -18,14 +25,16 @@
{% bootstrap_form form layout="checkout" %}
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<div class="help-block">
<p class="help-block">
{% blocktrans trimmed with hours=event.settings.waiting_list_hours %}
If tickets become available again, we will inform the first persons on the waiting list. If we notify you, you'll have {{ hours }} hours time to buy a ticket until we assign it to the next person on the list.
{% endblocktrans %}
</div>
<button type="submit" class="btn btn-primary">
{% trans "Add me to the list" %}
</button>
</p>
<p>
<button type="submit" class="btn btn-primary">
{% trans "Add me to the list" %}
</button>
</p>
</div>
</div>
</div>

View File

@@ -1,15 +1,16 @@
{% load i18n %}
<div class="table-responsive">
<table class="table table-calendar">
<caption class="sr-only">{% trans "Calendar" %}</caption>
<thead>
<tr>
<th>{{ weeks.1.0.date|date:"D" }}</th>
<th>{{ weeks.1.1.date|date:"D" }}</th>
<th>{{ weeks.1.2.date|date:"D" }}</th>
<th>{{ weeks.1.3.date|date:"D" }}</th>
<th>{{ weeks.1.4.date|date:"D" }}</th>
<th>{{ weeks.1.5.date|date:"D" }}</th>
<th>{{ weeks.1.6.date|date:"D" }}</th>
<th><span aria-hidden="true">{{ weeks.1.0.date|date:"D" }}</span><span class="sr-only">{{ weeks.1.0.date|date:"l" }}</span></th>
<th><span aria-hidden="true">{{ weeks.1.1.date|date:"D" }}</span><span class="sr-only">{{ weeks.1.1.date|date:"l" }}</span></th>
<th><span aria-hidden="true">{{ weeks.1.2.date|date:"D" }}</span><span class="sr-only">{{ weeks.1.2.date|date:"l" }}</span></th>
<th><span aria-hidden="true">{{ weeks.1.3.date|date:"D" }}</span><span class="sr-only">{{ weeks.1.3.date|date:"l" }}</span></th>
<th><span aria-hidden="true">{{ weeks.1.4.date|date:"D" }}</span><span class="sr-only">{{ weeks.1.4.date|date:"l" }}</span></th>
<th><span aria-hidden="true">{{ weeks.1.5.date|date:"D" }}</span><span class="sr-only">{{ weeks.1.5.date|date:"l" }}</span></th>
<th><span aria-hidden="true">{{ weeks.1.6.date|date:"D" }}</span><span class="sr-only">{{ weeks.1.6.date|date:"l" }}</span></th>
</tr>
</thead>
<tbody>
@@ -19,10 +20,10 @@
{% if day %}
<td class="day {% if day.events %}has-events{% else %}no-events{% endif %}"
data-date="{{ day.date|date:"SHORT_DATE_FORMAT" }}">
<h3>{{ day.day }}</h3>
<div class="events">
<p><time datetime="{{ day.date|date:"Y-m-d" }}">{{ day.day }}</time></p>
<ul class="events">
{% for event in day.events %}
<a class="event {% if event.continued %}continued{% else %} {% spaceless %}
<li><a class="event {% if event.continued %}continued{% else %} {% spaceless %}
{% if event.event.presale_is_running and show_avail %}
{% if event.event.best_availability_state == 100 %}
available
@@ -56,9 +57,9 @@
{% if not show_names|default_if_none:True %}
<strong>
{% endif %}
{{ event.time|date:"TIME_FORMAT" }}
<time datetime="{{ event.time|date:"H:i" }}">{{ event.time|date:"TIME_FORMAT" }}</time>
{% if event.event.settings.show_date_to and event.time_end %}
{{ event.time_end|date:"TIME_FORMAT" }}
<span aria-hidden="true"></span><span class="sr-only">{% trans "until" context "timerange" %}</span> <time datetime="{{ event.time_end|date:"H:i" }}">{{ event.time_end|date:"TIME_FORMAT" }}</time>
{% endif %}
{% if not show_names|default_if_none:True %}
</strong>
@@ -89,17 +90,19 @@
<span class="fa fa-ticket" aria-hidden="true"></span> {% trans "Sale over" %}
{% elif event.event.settings.presale_start_show_date and event.event.presale_start %}
<span class="fa fa-ticket" aria-hidden="true"></span>
{% blocktrans with start_date=event.event.presale_start|date:"SHORT_DATE_FORMAT" %}
{% with date_human=event.event.presale_start|date:"SHORT_DATE_FORMAT" date_iso=event.event.presale_start|date:"c" %}
{% blocktrans with start_date="<time datetime='"|add:date_iso|add:"'>"|add:date_human|add:"</time>"|safe %}
from {{ start_date }}
{% endblocktrans %}
{% endwith %}
{% else %}
<span class="fa fa-ticket" aria-hidden="true"></span> {% trans "Soon" %}
{% endif %}
</span>
{% endif %}
</a>
</a></li>
{% endfor %}
</div>
</ul>
</td>
{% else %}
<td class="no-day"></td>

View File

@@ -1,15 +1,17 @@
{% load i18n %}
<div id="ajaxerr">
</div>
<div id="loadingmodal">
<div id="loadingmodal" hidden aria-live="polite">
<div class="modal-card">
<div class="modal-card-icon">
<i class="fa fa-cog big-rotating-icon" aria-hidden="true"></i>
</div>
<div class="modal-card-content">
<h3></h3>
<p class="text"></p>
<p class="status">{% trans "If this takes longer than a few minutes, please contact us." %}</p>
<h3 id="loadingmodal-label"></h3>
<div id="loadingmodal-description">
<p class="text"></p>
<p class="status">{% trans "If this takes longer than a few minutes, please contact us." %}</p>
</div>
</div>
</div>
</div>

View File

@@ -4,11 +4,11 @@
<details class="weekday {% if day.events %}has-events{% else %}no-events{% endif %} {% if day.today %}today{% endif %}"
data-date="{{ day.date|date:"SHORT_DATE_FORMAT" }}" open>
<summary>
<h3><span class="fa fa-fw" aria-hidden="true"></span> {{ day.day_formatted }}</h3>
<h3><span class="fa fa-fw" aria-hidden="true"></span> <time datetime="{{ day.date|date:"Y-m-d" }}">{{ day.day_formatted }}</time></h3>
</summary>
<div class="events">
<ul class="events">
{% for event in day.events %}
<a class="event {% if event.continued %}continued{% else %} {% spaceless %}
<li><a class="event {% if event.continued %}continued{% else %} {% spaceless %}
{% if event.event.presale_is_running and show_avail %}
{% if event.event.best_availability_state == 100 %}
available
@@ -42,9 +42,9 @@
{% if not show_names|default_if_none:True %}
<strong>
{% endif %}
{{ event.time|date:"TIME_FORMAT" }}
<time datetime="{{ event.time|date:"H:i" }}">{{ event.time|date:"TIME_FORMAT" }}</time>
{% if event.time_end %}
{{ event.time_end|date:"TIME_FORMAT" }}
<span aria-hidden="true"></span><span class="sr-only">{% trans "until" context "timerange" %}</span> <time datetime="{{ event.time_end|date:"H:i" }}">{{ event.time_end|date:"TIME_FORMAT" }}</time>
{% endif %}
{% if not show_names|default_if_none:True %}
</strong>
@@ -83,9 +83,9 @@
{% endif %}
</span>
{% endif %}
</a>
</a></li>
{% endfor %}
</div>
</ul>
</details>
{% endfor %}
</div>

View File

@@ -22,8 +22,11 @@
{% if organizer.settings.locales|length > 1 %}
<nav class="locales" aria-label="{% trans "select language" %}">
{% for l in languages %}
<a href="{% url "presale:locale.set" %}?locale={{ l.code }}&next={{ request.path }}%3F{{ request.META.QUERY_STRING|urlencode }}" class="{% if l.code == request.LANGUAGE_CODE %}active{% endif %}" rel="nofollow">
{{ l.name_local }}</a>
<a href="{% url "presale:locale.set" %}?locale={{ l.code }}&next={{ request.path }}%3F{{ request.META.QUERY_STRING|urlencode }}" class="{% if l.code == request.LANGUAGE_CODE %}active{% endif %}" rel="nofollow"
lang="{{ l.code }}" hreflang="{{ l.code }}"
aria-label="{% language l.code %}{% blocktrans trimmed with language=l.name_local %}
Website in {{ language }}
{% endblocktrans %}{% endlanguage %}">{{ l.name_local }}</a>
{% endfor %}
</nav>
{% endif %}
@@ -56,8 +59,11 @@
{% if organizer.settings.locales|length > 1 %}
<nav class="locales" aria-label="{% trans "select language" %}">
{% for l in languages %}
<a href="{% url "presale:locale.set" %}?locale={{ l.code }}&next={{ request.path }}%3F{{ request.META.QUERY_STRING|urlencode }}" class="{% if l.code == request.LANGUAGE_CODE %}active{% endif %}" rel="nofollow">
{{ l.name_local }}</a>
<a href="{% url "presale:locale.set" %}?locale={{ l.code }}&next={{ request.path }}%3F{{ request.META.QUERY_STRING|urlencode }}" class="{% if l.code == request.LANGUAGE_CODE %}active{% endif %}" rel="nofollow"
lang="{{ l.code }}" hreflang="{{ l.code }}"
aria-label="{% language l.code %}{% blocktrans trimmed with language=l.name_local %}
Website in {{ language }}
{% endblocktrans %}{% endlanguage %}">{{ l.name_local }}</a>
{% endfor %}
</nav>
{% endif %}
@@ -79,10 +85,9 @@
{% endblock %}
{% block footernav %}
{% if not request.event and request.organizer.settings.contact_mail %}
<a href="mailto:{{ request.organizer.settings.contact_mail }}">{% trans "Contact event organizer" %}</a> &middot;
<li><a href="mailto:{{ request.organizer.settings.contact_mail }}">{% trans "Contact event organizer" %}</a></li>
{% endif %}
{% if not request.event and request.organizer.settings.imprint_url %}
<a href="{% safelink request.organizer.settings.imprint_url %}" target="_blank" rel="noopener">{% trans "Imprint" %}</a>
&middot;
<li><a href="{% safelink request.organizer.settings.imprint_url %}" target="_blank" rel="noopener">{% trans "Imprint" %}</a></li>
{% endif %}
{% endblock %}

View File

@@ -42,13 +42,13 @@
{% trans "iCal" %}
</a>
</div>
<div class="col-sm-4 col-xs-12 text-center">
<select name="month" class="form-control">
<div class="col-sm-4 col-xs-12 text-center" role="group" aria-label="{% trans "Select month and year to show" %}">
<select name="month" class="form-control" aria-label="{% trans "Month" %}">
{% for m in months %}
<option value="{{ m|date:"m" }}" {% if m == date %}selected{% endif %}>{{ m|date:"F" }}</option>
{% endfor %}
</select>
<select name="year" class="form-control">
<select name="year" class="form-control" aria-label="{% trans "Year" %}">
{% for y in years %}
<option value="{{ y }}" {% if y == date.year %}selected{% endif %}>{{ y }}</option>
{% endfor %}

View File

@@ -37,6 +37,7 @@
</h3>
</div>
<table class="panel-body table table-hover">
<caption class="sr-only">{% trans "Usages" %}</caption>
<thead>
<tr>
<th>{% trans "Order code" %}</th>
@@ -74,10 +75,7 @@
</td>
<td class="text-right flip">
{% if op.canceled %}
<span class="label label-danger">
<span class="fa fa-times"></span>
{% trans "Canceled" %}
</span>
{% trans "Canceled" %} <i class="{{ class }} fa fa-times-circle text-danger" aria-hidden="true"></i>
{% else %}
{% include "pretixcontrol/orders/fragment_order_status.html" with order=op.order %}
{% endif %}

View File

@@ -111,6 +111,7 @@
</div>
<div role="tabpanel" class="tab-pane" id="memberships">
<table class="panel-body table table-hover">
<caption class="sr-only">{% trans "Memberships" %}</caption>
<thead>
<tr>
<th>{% trans "Membership type" %}</th>

View File

@@ -81,7 +81,7 @@
<div class="col-md-3 col-xs-12">
{% if e.settings.show_dates_on_frontpage %}
{{ e.daterange|default:e.get_date_range_display }}
{{ e.daterange|default:e.get_date_range_display_as_html }}
{% if e.settings.show_times and not e.has_subevents %}
{% timezone e.tzname %}
<br><small class="text-muted" data-time="{{ e.date_from.isoformat }}" data-timezone="{{ e.tzname }}">

View File

@@ -245,6 +245,7 @@ class CartMixin:
'minutes_left': minutes_left,
'seconds_left': seconds_left,
'first_expiry': first_expiry,
'is_ordered': bool(order),
'itemcount': sum(c.count for c in positions if not c.addon_to)
}

View File

@@ -630,7 +630,7 @@ class RedeemView(NoSearchIndexViewMixin, EventViewMixin, CartMixin, TemplateView
if err:
messages.error(request, _(err))
return redirect(self.get_index_url())
return redirect(self.get_index_url() + "?voucher_invalid")
return super().dispatch(request, *args, **kwargs)

View File

@@ -194,7 +194,7 @@ body:after {
height: 30px;
background: url(static('lightbox/images/close.png')) top right no-repeat;
text-align: right;
outline: none;
border: none;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
opacity: 0.7;
-webkit-transition: opacity 0.2s;

View File

@@ -1,3 +1,12 @@
/*
WARNING! CUSTOMIZED!
Added improvements for better A11y-support,
i.e. role, aria-labelledby, aria-modal and <button>
*/
/*!
* Lightbox v2.8.1
* by Lokesh Dhakar
@@ -78,7 +87,7 @@
// Attach event handlers to the new DOM elements. click click click
Lightbox.prototype.build = function() {
var self = this;
$('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo($('body'));
$('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox" role="dialog" aria-labelledby="lightboxLabel" aria-modal="true"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details" id="lightboxLabel"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><button aria-label="'+gettext("close")+'" class="lb-close"></button></div></div></div></div>').appendTo($('body'));
// Cache jQuery objects
this.$lightbox = $('#lightbox');
@@ -195,6 +204,7 @@
left: left + 'px'
}).fadeIn(this.options.fadeDuration);
this.$lightbox.find(".lb-close").focus();
this.changeImage(imageNumber);
};
@@ -359,6 +369,7 @@
// Thanks Nate Wright for the fix. @https://github.com/NateWr
if (typeof this.album[this.currentImageIndex].title !== 'undefined' &&
this.album[this.currentImageIndex].title !== '') {
this.$lightbox.find('.lb-image').attr("alt", this.album[this.currentImageIndex].title);
this.$lightbox.find('.lb-caption')
.html(this.album[this.currentImageIndex].title)
.fadeIn('fast')

File diff suppressed because one or more lines are too long

View File

@@ -244,13 +244,15 @@ $(function () {
var waitingDialog = {
show: function (message) {
"use strict";
$("#loadingmodal").find("h3").html(message);
$("#loadingmodal h3").html(message);
$("#loadingmodal .progress").hide();
$("body").addClass("loading");
$("#loadingmodal").removeAttr("hidden");
},
hide: function () {
"use strict";
$("body").removeClass("loading");
$("#loadingmodal").attr("hidden", true);
}
};

View File

@@ -2,8 +2,8 @@
setup_collapsible_details = function (el) {
var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]';
el.find("details summary, details summary a[data-toggle=variations]").click(function (e) {
if (this.tagName !== "A" && $(e.target).closest("a, button").length > 0) {
el.find("details summary").click(function (e) {
if (this.tagName !== "A" && $(e.target).closest("a").length > 0) {
return true;
}
var $details = $(this).closest("details");
@@ -57,6 +57,36 @@ setup_collapsible_details = function (el) {
return false;
});
});
el.find("article button[data-toggle=variations]").click(function (e) {
var $button = $(this);
var $details = $button.closest("article");
var $detailsNotSummary = $(".variations", $details);
var isOpen = !$detailsNotSummary.prop("hidden");
if ($detailsNotSummary.is(':animated')) {
e.preventDefault();
return false;
}
var altLabel = $button.attr("data-label-alt");
$button.attr("data-label-alt", $button.text());
$button.text(altLabel);
$button.attr("aria-expanded", !isOpen);
if (isOpen) {
$details.removeClass("details-open");
$detailsNotSummary.stop().show().slideUp(500, function () {
$detailsNotSummary.prop("hidden", true);
});
} else {
$detailsNotSummary.prop("hidden", false).stop().hide();
$details.addClass("details-open");
$detailsNotSummary.slideDown();
}
e.preventDefault();
return false;
});
el.find(".variations-collapsed").prop("hidden", true);
};
$(function () {

View File

@@ -100,9 +100,8 @@ input[type=number]::-webkit-outer-spin-button {
background: transparent;
border: transparent;
}
.alert-primary, .alert-warning, .alert-info, .alert-success, .alert-danger {
color: #3b3b3b;
.panel-heading {
border-radius: 0;
}
.panel-danger > .panel-heading, .panel-success > .panel-heading, .panel-default > .panel-heading, .panel-info > .panel-heading, .panel-warning > .panel-heading {
color: #000000;
@@ -122,7 +121,7 @@ input[type=number]::-webkit-outer-spin-button {
text-align: left;
}
.alert-legal {
border-color: $state-info-border;
@include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
}
.alert-success, .alert-danger, .alert-info, .alert-warning, .alert-legal {
position: relative;
@@ -166,6 +165,7 @@ input[type=number]::-webkit-outer-spin-button {
}
.alert-primary::before {
background: $brand-primary !important;
outline-color: $brand-primary;
}
.alert-primary {
border-color: $brand-primary !important;

View File

@@ -44,14 +44,18 @@ $navbar-inverse-link-hover-color: $gray-lighter;
$navbar-inverse-brand-hover-color: $gray-lighter;
$navbar-inverse-color: white;
$state-success-bg: white !default;
$state-success-bg: lighten($brand-success, 48%) !default;
$state-success-border: $brand-success;
$state-info-bg: white !default;
$state-success-text: darken($brand-success, 10%);
$state-info-bg: lighten($brand-info, 33%) !default;
$state-info-border: $brand-info;
$state-warning-bg: white !default;
$state-info-text: darken($brand-info, 20%);
$state-warning-bg: lighten($brand-warning, 41%) !default;
$state-warning-border: $brand-warning;
$state-danger-bg: white !default;
$state-danger-border: $brand-danger;
$state-warning-text: darken($brand-warning, 25%);
$state-danger-bg: lighten($brand-danger, 43%) !default;
$state-danger-border: $brand-danger;
$state-danger-text: darken($brand-danger, 5%);
$panel-success-border: tint($brand-success, 50%);
$panel-success-heading-bg: tint($brand-success, 50%);
$panel-danger-border: tint($brand-danger, 50%);

View File

@@ -35,16 +35,20 @@ var cart = {
var now = cart._get_now();
var diff_minutes = Math.floor(cart._deadline.diff(now) / 1000 / 60);
var diff_seconds = Math.floor(cart._deadline.diff(now) / 1000 % 60);
if (diff_minutes < 2 || diff_minutes == 5) $("#cart-deadline").get(0).setAttribute("aria-live", "polite");
else $("#cart-deadline").get(0).removeAttribute("aria-live");
if (diff_minutes < 0) {
$("#cart-deadline").text(gettext("The items in your cart are no longer reserved for you."));
$("#cart-deadline").text(gettext("The items in your cart are no longer reserved for you. You can still complete your order as long as theyre available."));
$("#cart-deadline-short").text(
gettext("Cart expired")
);
window.clearInterval(cart._deadline_interval);
} else {
$("#cart-deadline").text(ngettext(
"The items in your cart are reserved for you for one minute.",
"The items in your cart are reserved for you for {num} minutes.",
"The items in your cart are reserved for you for one minute.",
"The items in your cart are reserved for you for {num} minutes.",
diff_minutes
).replace(/\{num\}/g, diff_minutes));
$("#cart-deadline-short").text(
@@ -71,13 +75,17 @@ $(function () {
cart.init();
}
$(".apply-voucher").hide();
$(".apply-voucher-toggle").click(function (e) {
$(".apply-voucher-toggle").hide();
$(".apply-voucher").show();
$(".apply-voucher input[type=text]").first().focus();
e.preventDefault();
return true;
$(".toggle-container").each(function() {
var summary = $(".toggle-summary", this);
var content = $("> :not(.toggle-summary)", this);
var toggle = summary.find(".toggle").on("click", function(e) {
this.ariaExpanded = !this.ariaExpanded;
if (this.classList.contains("toggle-remove")) summary.attr("hidden", true);
content.show().find(":input:visible").first().focus();
});
if (toggle.attr("aria-expanded")) {
content.hide();
}
});
$(".cart-icon-details.collapse-lines").each(function () {

View File

@@ -119,7 +119,7 @@ var form_handlers = function (el) {
width: $(this).attr("data-size") ? parseInt($(this).attr("data-size")) : 256,
height: $(this).attr("data-size") ? parseInt($(this).attr("data-size")) : 256,
}
);
).find("canvas").attr("role", "img").attr("aria-label", this.getAttribute("data-desc"));
});
el.find("input[data-exclusive-prefix]").each(function () {
@@ -180,6 +180,11 @@ $(function () {
$("body").removeClass("nojs");
$(".accordion-radio").click(function() {
var $input = $("input", this);
if (!$input.prop("checked")) $input.prop('checked', true).trigger("change");
});
$("input[data-toggle=radiocollapse]").change(function () {
$($(this).attr("data-parent")).find(".collapse.in").collapse('hide');
$($(this).attr("data-target")).collapse('show');
@@ -191,6 +196,27 @@ $(function () {
$(".has-error, .alert-danger").each(function () {
$(this).closest("div.panel-collapse").collapse("show");
});
$(".has-error").first().each(function(){
if ($(this).is(':input')) this.focus();
else $(":input", this).get(0).focus();
});
$(".alert-danger").first().each(function() {
var content = $("<ul></ul>").click(function(e) {
var input = $(e.target.hash).get(0);
if (input) input.focus();
input.scrollIntoView({block: "center"});
e.preventDefault();
});
$(".has-error").each(function() {
var target = target = $(":input", this);
var desc = $("#" + target.attr("aria-describedby").split(' ', 1)[0]);
// multi-input fields have a role=group with aria-labelledby
var label = this.hasAttribute("aria-labelledby") ? $("#" + this.getAttribute("aria-labelledby")) : $("[for="+target.attr("id")+"]");
content.append("<li><a href='#" + target.attr("id") + "'>" + label.get(0).childNodes[0].nodeValue + "</a>: "+desc.text()+"</li>");
});
$(this).append(content);
});
$("#voucher-box").hide();
$("#voucher-toggle").show();
@@ -280,9 +306,9 @@ $(function () {
// Subevent choice
if ($(".subevent-toggle").length) {
$(".subevent-list").hide();
$(".subevent-toggle").css("display", "block").click(function () {
$(".subevent-toggle").show().click(function () {
$(".subevent-list").slideToggle(300);
$(".subevent-toggle").slideToggle(300)
$(this).slideToggle(300).attr("aria-expanded", true);
});
}
@@ -320,7 +346,7 @@ $(function () {
$(".table-calendar td.has-events").click(function () {
var $tr = $(this).closest(".table-calendar").find(".selected-day");
$tr.find("td").html($(this).find(".events").html());
$tr.find("td").html($(this).find(".events").clone());
$tr.find("td").prepend($("<h3>").text($(this).attr("data-date")));
$tr.removeClass("hidden");
});

View File

@@ -3,57 +3,82 @@
width: 14.29%;
}
h3 {
margin: 0;
font-size: 16px;
}
p {
margin-bottom: 0;
}
.events {
list-style: none;
padding: 0;
}
a.event {
display: block;
background: $brand-primary;
color: white;
border-radius: $border-radius-large;
background: lighten($brand-primary, 48%);
color: $brand-primary;
border-radius: $border-radius-base;
border-style: solid;
border-color: lighten($brand-primary, 30%);
border-width: 1px 1px 1px 12px;
border-left-color: inherit;
padding: 3px 5px;
margin-top: 3px;
font-size: 12px;
overflow-wrap: anywhere;
text-decoration: none;
&.continued {
background: #888;
opacity: 0.8;
&:hover {
background: lighten($brand-primary, 50%);
border-color: $brand-primary;
}
&:focus {
outline-color: inherit;
}
&.continued, &.over {
background: lighten(#767676, 48%);
border-color: lighten(#767676, 30%);
border-left-color: lighten(#767676, 30%);
color: #767676;
&:hover {
background: darken(#888, 15%);
opacity: 1;
background: lighten(#767676, 50%);
border-color: lighten(#767676, 25%);
}
}
&.soon {
opacity: 0.8;
background: lighten($brand-primary, 53%);
border-color: lighten($brand-primary, 40%);
border-left-color: lighten($brand-primary, 20%);
color: lighten($brand-primary, 5%);
&:hover {
opacity: 1;
}
}
&.over {
opacity: 0.8;
background: #888;
&:hover {
opacity: 1;
background: darken(#888, 15%);
background: lighten($brand-primary, 55%);
border-color: lighten($brand-primary, 20%);
}
}
&.available, {
background: $brand-success;
background: lighten($brand-success, 48%);
border-color: lighten($brand-success, 30%);
border-left-color: $brand-success;
color: darken($brand-success, 12%);
&:hover {
background: darken($brand-success, 15%);
background: lighten($brand-success, 50%);
border-color: $brand-success;
}
}
&.reserved, &.soldout, {
background: $brand-danger;
background: lighten($brand-danger, 43%);
border-color: lighten($brand-danger, 30%);
border-left-color: lighten($brand-danger, 30%);
color: darken($brand-danger, 5%);
&:hover {
background: darken($brand-danger, 15%);
background: lighten($brand-danger, 45%);
border-color: lighten($brand-danger, 25%);
}
}
@@ -64,11 +89,6 @@
.event-time, .event-status {
display: block;
}
&:hover {
text-decoration: none;
background: darken($brand-primary, 15%);
}
}
}
.week-calendar {

View File

@@ -2,6 +2,13 @@
/* Cart grid */
padding: 10px 0;
.product>*:last-child {
margin-bottom: 0;
}
.product p+.dl-inline {
margin-top: -10px;
}
.count form {
display: inline;
}
@@ -14,21 +21,23 @@
line-height: 1;
}
&.total {
border-top: 1px solid $table-border-color;
}
dl {
.dl-indented {
padding-left: 20px;
margin-bottom: 0;
margin: 5px 0 0;
dt {
margin-top: 5px;
}
dd:not(.toplevel) {
padding-left: 20px;
}
}
dt {
font-weight: normal;
}
margin-left: 0;
margin-right: 0;
margin-left: -15px;
margin-right: -15px;
&>div {
position: relative;
@@ -59,14 +68,6 @@
font-weight: bold;
}
dl {
margin: 5px 0;
dt {
font-weight: normal;
margin-top: 5px;
}
}
.cart-icon-details {
position: relative;
padding-left: 1.4em;
@@ -94,23 +95,88 @@
}
}
.apply-voucher {
input {
height: 32px;
.cart [role=rowgroup]:last-child {
border-top: 1px solid $table-border-color;
}
.cart .total strong {
font-size: $font-size-large;
}
.cart .checkout-button-secondary > :last-child p {
margin-bottom: 0;
}
.cart .checkout-button-row > div {
margin-bottom: 0;
width: 100%;
}
.cart .checkout-button-row .btn {
width: 100%;
white-space: nowrap;
min-height: 34px;
}
.cart .checkout-button-row .btn-primary {
padding-left: 1.5em;
padding-right: 1.5em;
}
.cart .row:last-child p:last-child {
margin-bottom: 0;
}
@media (min-width: $screen-xs-min) {
.cart .checkout-button-secondary {
display: flex;
align-items: center;
gap: floor(($grid-gutter-width / 2));
}
.cart .checkout-button-secondary > * {
flex: 1 0;
}
.cart .checkout-button-row > :last-child p {
margin-bottom: 0;
}
}
@media (min-width: $screen-sm-min) {
.cart .checkout-button-row .btn-primary {
width: auto;
}
.cart .checkout-button-row {
display: flex;
align-items: center;
flex-direction: row-reverse;
justify-content: space-between;
padding-top: 0;
margin-left: - floor(($grid-gutter-width / 4));
margin-right: - floor(($grid-gutter-width / 4));
}
.cart .checkout-button-row > * {
padding-left: floor(($grid-gutter-width / 4));
padding-right: floor(($grid-gutter-width / 4));
flex: 0;
}
.cart .checkout-button-primary p {
text-align: right;
margin-bottom: 0;
}
.cart .checkout-button-secondary > * {
flex: 1 0;
}
#voucher_code {
min-width: 10em;
}
}
@media(max-width: $screen-sm-max) {
.cart .panel-body {
padding: 5px;
.checkout-button-row {
padding: 0 10px;
}
#cart-deadline {
display: block;
padding: 0 10px 5px;
}
}
.cart-row {
.download-desktop {
clear: both;

View File

@@ -2,6 +2,7 @@
display: flex;
flex-direction: row;
margin: 15px 0 13px 0;
list-style: none;
.checkout-step {
flex: 1;
@@ -26,8 +27,13 @@
padding-top: 10px;
color: $text-muted;
}
a .checkout-step-label {
color: $brand-primary;
}
.checkout-step-bar-left {
&:before, &:after {
content: "";
display: block;
position: absolute;
top: 22px;
left: 0;
@@ -36,14 +42,15 @@
background: $gray-lighter;
z-index: 100;
}
.checkout-step-bar-right {
position: absolute;
top: 22px;
&:after {
left: 50%;
width: 50%;
height: 6px;
background: $gray-lighter;
z-index: 100;
}
&.step-done:before, &.step-done:after, &.step-current:before {
background: $brand-primary;
}
&:last-child:after,
&:first-child:before {
display: none;
}
&.step-done .checkout-step-icon {
@@ -51,12 +58,9 @@
background: $brand-primary;
color: white;
}
&.step-done .checkout-step-label {
&.step-done .checkout-step-label a {
color: $brand-primary;
}
&.step-done .checkout-step-bar-left, &.step-done .checkout-step-bar-right {
background: $brand-primary;
}
&.step-current .checkout-step-icon {
border: 1px solid $brand-primary;
@@ -66,25 +70,26 @@
&.step-current .checkout-step-label {
color: $brand-primary;
}
&.step-current .checkout-step-bar-left {
background: $brand-primary;
}
&:last-child .checkout-step-bar-right,
&:first-child .checkout-step-bar-left {
background: transparent;
}
&:hover, &:active {
text-decoration: none;
}
}
a {
outline: none;
text-decoration: none;
}
}
@media(max-width: $screen-sm-max) {
.checkout-step-label {
display: none;
/* visually hide, but keep for screen-readers */
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
}

View File

@@ -1,12 +1,10 @@
.addons legend {
border-bottom: none;
}
.product-row {
.addons &:first-child {
border-top: 2px solid $table-border-color;
}
.addons &:last-child {
border-bottom: 2px solid $table-border-color;
}
&:last-child {
.addons & {
margin-left: -15px;
margin-right: -15px;
}
p {
margin-bottom: 0;
@@ -78,7 +76,7 @@
display: block;
}
.price ins {
color: $brand-success;
color: $alert-success-text;
font-size: 18px;
font-weight: bold;
text-decoration: none;
@@ -121,6 +119,9 @@ article.item-with-variations:last-child, .product-row:last-child {
border-bottom: 2px solid $table-border-color;
}
}
article.item-with-variations .product-row:last-child:after {
display: none;
}
.radio .variation-description {
padding-left: 20px;
@@ -170,7 +171,7 @@ article.item-with-variations:last-child, .product-row:last-child {
.checkout-button-row {
padding-top: 15px;
}
section.front-page {
div.front-page {
margin-top: 30px;
}
.offline-banner {
@@ -201,23 +202,21 @@ section.front-page {
.subevent-list {
background-color: white;
form {
padding: 10px 0;
}
.row {
margin: 0;
}
a.subevent-row {
.label {
text-decoration: none;
}
.subevent-row a {
display: block;
color: $text-color;
padding: 3px 0;
}
a.subevent-row:nth-child(2n) {
.subevent-row:nth-child(2n) a {
background-color: $gray-lighter;
}
a.subevent-row:hover {
text-decoration: none;
.subevent-row:hover a {
background-color: darken($gray-lighter, 10%);
}
.subevent-row .row > div {
@@ -226,6 +225,16 @@ section.front-page {
vertical-align: middle;
}
}
.calendar-nav, .calendar-nav li {
list-style: none;
margin: 0;
padding: 0
}
.calendar-nav li {
padding: 10px 0;
}
.subevent-toggle {
display: none;
}
@@ -269,8 +278,16 @@ h2.subevent-head {
margin-bottom: 20px;
}
.info-download {
margin-top: 15px;
margin-top: 0;
margin-bottom: 30px;
}
.lead + .info-download {
margin-top: -15px;
}
.download-btn-form + .download-btn-form {
margin-left: .5em;
}
.refund-gift-card-code {
font-size: 24px;
font-family: $font-family-monospace;

View File

@@ -10,6 +10,9 @@ a.btn, button.btn {
.panel-title .radio {
margin-left: 20px;
}
.panel-title label {
margin-bottom: 0;
}
.form-control + .form-control-feedback {
/* Fix for https://github.com/FortAwesome/Font-Awesome/issues/4313 */
@@ -68,13 +71,11 @@ a.btn, button.btn {
.panel-default>.accordion-radio>.panel-heading {
color: #333;
background-color: #f5f5f5;
padding: 12px 15px;
padding: 8px 15px;
input[type=radio] {
margin-top: 0;
margin-right: 5px;
position: relative;
top: 2px;
}
}
.panel-default>.accordion-radio+.panel-collapse>.panel-body {

View File

@@ -27,11 +27,11 @@
.page-header-links > div.header-part {
padding-top: 15px;
a {
a:link, a:visited {
color: choose-contrast-color($body-bg, white, $link-color);
}
a.active, .locales a.active {
border-bottom-color: choose-contrast-color($body-bg, white, $link-color) !important;
a:active, a:hover, a:focus {
color: choose-contrast-color($body-bg, white, $link-hover-color);
}
}

View File

@@ -20,6 +20,35 @@
line-height: 1.8em;
}
.order-details dt {
font-weight: normal;
float: left;
margin-right: .25em;
}
.status-dot {
font-size: 1.2em;
}
.text-warning { color: $brand-warning; }
.text-info { color: $brand-info; }
.text-success { color: $brand-success; }
.text-danger { color: $brand-danger; }
h1 a, .btn {
text-decoration: none;
}
/*
a, .btn-link {
text-decoration: underline;
}
*/
/* bootstrap sets outline-offset with :active:focus so we need to match specifity of selector */
/* see line 26, pretix/static/bootstrap/scss/bootstrap/_buttons.scss */
button:focus, a:focus, .btn:focus, summary:focus,
/*button:active, a:active, .btn:active, summary:active,*/
button:active:focus, a:active:focus, .btn:active:focus, summary:active:focus {
outline: 2px solid $link-hover-color;
outline-offset: 2px;
}
footer {
padding: 10px 0;
}
@@ -27,24 +56,39 @@ footer nav {
text-align: center;
font-size: 11px;
}
footer nav ul {
display: flex;
justify-content: center;
list-style: none;
}
footer nav li:not(:first-child):before {
content: "·";
font-weight: bold;
display: inline-block;
width: 1.5em;
text-align: center;
}
.js-only {
display: none;
}
.locales, .loginstatus {
display: inline;
a {
text-decoration: none;
}
a:hover {
border-bottom: 2px solid $gray-light;
}
a.active {
border-bottom: 2px solid $brand-primary;
/*border-bottom: 2px solid $brand-primary;*/
font-weight: bold;
}
img {
vertical-align: baseline;
}
}
.locales ul {
display: inline;
list-style: none;
}
.locales li {
display: inline;
}
.loginstatus a {
margin-left: 10px;
}
@@ -181,8 +225,10 @@ body.loading .container {
@media (min-width: $screen-md-min) {
.thank-you {
min-height: 170px;
width: 70%;
margin: auto;
max-width: 59em;
margin-left: auto;
margin-right: auto;
margin-bottom: 3em;
.fa {
float: left;
@@ -213,9 +259,15 @@ body.loading .container {
}
}
.blank-after {
margin-bottom: 1em;
}
.dl-horizontal dt {
white-space: normal;
}
.dl-inline dt, .dl-inline dd {
display: inline;
}
.collapse-indicator {
-moz-transition: all 150ms ease-in 0s;
@@ -231,7 +283,7 @@ body.loading .container {
transform: rotate(180deg);
}
.panel-title a[data-toggle="collapse"], details h3.panel-title, details h4.panel-title {
.panel-title a[data-toggle="collapse"], details .panel-title {
display: flex;
padding: 10px 15px;
margin: -10px -15px;

View File

@@ -43,18 +43,28 @@ def test_same_day_german():
with translation.override('de'):
df = date(2003, 2, 1)
assert daterange(df, df) == "1. Februar 2003"
assert daterange(df, df, as_html=True) == '<time datetime="2003-02-01">1. Februar 2003</time>'
def test_same_day_english():
with translation.override('en'):
df = date(2003, 2, 1)
assert daterange(df, df) == "Feb. 1st, 2003"
assert daterange(df, df, as_html=True) == '<time datetime="2003-02-01">Feb. 1st, 2003</time>'
def test_same_day_spanish():
with translation.override('es'):
df = date(2003, 2, 1)
assert daterange(df, df) == "1 de Febrero de 2003"
assert daterange(df, df, as_html=True) == '<time datetime="2003-02-01">1 de Febrero de 2003</time>'
def test_same_day_other_lang():
with translation.override('tr'):
df = date(2003, 2, 1)
assert daterange(df, df) == '01 Şubat 2003'
assert daterange(df, df, as_html=True) == '<time datetime="2003-02-01">01 Şubat 2003</time>'
def test_same_month_german():
@@ -62,6 +72,7 @@ def test_same_month_german():
df = date(2003, 2, 1)
dt = date(2003, 2, 3)
assert daterange(df, dt) == "1.3. Februar 2003"
assert daterange(df, dt, as_html=True) == '<time datetime="2003-02-01">1.</time><time datetime="2003-02-03">3. Februar 2003</time>'
def test_same_month_english():
@@ -69,6 +80,7 @@ def test_same_month_english():
df = date(2003, 2, 1)
dt = date(2003, 2, 3)
assert daterange(df, dt) == "Feb. 1st 3rd, 2003"
assert daterange(df, dt, as_html=True) == '<time datetime="2003-02-01">Feb. 1st</time> <time datetime="2003-02-03">3rd, 2003</time>'
def test_same_month_spanish():
@@ -76,6 +88,7 @@ def test_same_month_spanish():
df = date(2003, 2, 1)
dt = date(2003, 2, 3)
assert daterange(df, dt) == "1 - 3 de Febrero de 2003"
assert daterange(df, dt, as_html=True) == '<time datetime="2003-02-01">1</time> - <time datetime="2003-02-03">3 de Febrero de 2003</time>'
def test_same_year_german():
@@ -83,6 +96,7 @@ def test_same_year_german():
df = date(2003, 2, 1)
dt = date(2003, 4, 3)
assert daterange(df, dt) == "1. Februar 3. April 2003"
assert daterange(df, dt, as_html=True) == '<time datetime="2003-02-01">1. Februar</time> <time datetime="2003-04-03">3. April 2003</time>'
def test_same_year_english():
@@ -90,6 +104,7 @@ def test_same_year_english():
df = date(2003, 2, 1)
dt = date(2003, 4, 3)
assert daterange(df, dt) == "Feb. 1st April 3rd, 2003"
assert daterange(df, dt, as_html=True) == '<time datetime="2003-02-01">Feb. 1st</time> <time datetime="2003-04-03">April 3rd, 2003</time>'
def test_same_year_spanish():
@@ -97,6 +112,7 @@ def test_same_year_spanish():
df = date(2003, 2, 1)
dt = date(2003, 4, 3)
assert daterange(df, dt) == "1 de Febrero - 3 de Abril de 2003"
assert daterange(df, dt, as_html=True) == '<time datetime="2003-02-01">1 de Febrero</time> - <time datetime="2003-04-03">3 de Abril de 2003</time>'
def test_different_dates_german():
@@ -104,6 +120,7 @@ def test_different_dates_german():
df = date(2003, 2, 1)
dt = date(2005, 4, 3)
assert daterange(df, dt) == "1. Februar 2003 3. April 2005"
assert daterange(df, dt, as_html=True) == '<time datetime="2003-02-01">1. Februar 2003</time> <time datetime="2005-04-03">3. April 2005</time>'
def test_different_dates_english():
@@ -111,6 +128,7 @@ def test_different_dates_english():
df = date(2003, 2, 1)
dt = date(2005, 4, 3)
assert daterange(df, dt) == "Feb. 1, 2003 April 3, 2005"
assert daterange(df, dt, as_html=True) == '<time datetime="2003-02-01">Feb. 1, 2003</time> <time datetime="2005-04-03">April 3, 2005</time>'
def test_different_dates_spanish():
@@ -118,3 +136,14 @@ def test_different_dates_spanish():
df = date(2003, 2, 1)
dt = date(2005, 4, 3)
assert daterange(df, dt) == "1 de Febrero de 2003 3 de Abril de 2005"
assert daterange(df, dt, as_html=True) == '<time datetime="2003-02-01">1 de Febrero de 2003</time> ' \
'<time datetime="2005-04-03">3 de Abril de 2005</time>'
def test_different_dates_other_lang():
with translation.override('tr'):
df = date(2003, 2, 1)
dt = date(2005, 4, 3)
assert daterange(df, dt) == "01 Şubat 2003 03 Nisan 2005"
assert daterange(df, dt, as_html=True) == '<time datetime="2003-02-01">01 Şubat 2003</time> ' \
'<time datetime="2005-04-03">03 Nisan 2005</time>'

View File

@@ -214,7 +214,7 @@ class OrdersTest(BaseOrdersTest):
assert response.status_code == 200
doc = BeautifulSoup(response.content.decode(), "lxml")
assert len(doc.select(".cart-row")) > 0
assert "pending" in doc.select(".label-warning")[0].text.lower()
assert "pending" in doc.select(".order-details")[0].text.lower()
assert "Peter" in response.content.decode()
assert "Lukas" not in response.content.decode()
@@ -226,7 +226,7 @@ class OrdersTest(BaseOrdersTest):
assert response.status_code == 200
doc = BeautifulSoup(response.content.decode(), "lxml")
assert len(doc.select(".cart-row")) > 0
assert "pending" in doc.select(".label-warning")[0].text.lower()
assert "pending" in doc.select(".order-details")[0].text.lower()
assert "Peter" in response.content.decode()
assert "Lukas" not in response.content.decode()