forked from CGM_Public/pretix_original
Allow to define ticket validity through a product (#3105)
This commit is contained in:
@@ -176,14 +176,55 @@
|
||||
</fieldset>
|
||||
{% endfor %}
|
||||
<fieldset>
|
||||
<legend>{% trans "Tickets & check-in" %}</legend>
|
||||
<legend>{% trans "Tickets & Badges" %}</legend>
|
||||
{% bootstrap_field form.generate_tickets layout="control" %}
|
||||
{% for f in plugin_forms %}
|
||||
{% if f.is_layouts %}
|
||||
{% bootstrap_form f layout="control" %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{% trans "Check-in & Validity" %}</legend>
|
||||
{% bootstrap_field form.checkin_attention layout="control" %}
|
||||
{% bootstrap_field form.validity_mode layout="control" %}
|
||||
<div data-display-dependency="#{{ form.validity_mode.id_for_label }}" data-display-dependency-value="fixed">
|
||||
{% bootstrap_field form.validity_fixed_from layout="control" %}
|
||||
{% bootstrap_field form.validity_fixed_until layout="control" %}
|
||||
</div>
|
||||
<div data-display-dependency="#{{ form.validity_mode.id_for_label }}" data-display-dependency-value="dynamic">
|
||||
<div class="form-group metadata-group">
|
||||
<label class="col-md-3 control-label">{% trans "Duration" %}</label>
|
||||
<div class="col-md-9">
|
||||
{% trans "minutes" as t_minutes %}
|
||||
{% trans "hours" as t_hours %}
|
||||
{% trans "days" as t_days %}
|
||||
{% trans "months" as t_months %}
|
||||
{% trans "years" as t_years %}
|
||||
{% bootstrap_field form.validity_dynamic_duration_months layout="control" addon_after=t_months horizontal_field_class="" horizontal_label_class="sr-only" %}
|
||||
{% bootstrap_field form.validity_dynamic_duration_days layout="control" addon_after=t_days addon_before="+" horizontal_field_class="" horizontal_label_class="sr-only" %}
|
||||
{% bootstrap_field form.validity_dynamic_duration_hours layout="control" addon_after=t_hours addon_before="+" horizontal_field_class="" horizontal_label_class="sr-only" %}
|
||||
{% bootstrap_field form.validity_dynamic_duration_minutes layout="control" addon_after=t_minutes addon_before="+" horizontal_field_class="" horizontal_label_class="sr-only" %}
|
||||
<div class="help-block">
|
||||
{% blocktrans trimmed %}
|
||||
If you select a duration given in days, months or years, the validity will always end at the
|
||||
end of a full day (midnight), plus the number of minutes and hours selected above.
|
||||
The start date is included in the calculation, so if you enter "1 day", the ticket
|
||||
will be valid until the end of the day it starts on.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% bootstrap_field form.validity_dynamic_start_choice layout="control" %}
|
||||
<div data-display-dependency="#{{ form.validity_dynamic_start_choice.id_for_label }}">
|
||||
{% trans "days" as t_days %}
|
||||
{% bootstrap_field form.validity_dynamic_start_choice_day_limit addon_after=t_days layout="control" %}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{% trans "Additional settings" %}</legend>
|
||||
{% bootstrap_field form.issue_giftcard layout="control" %}
|
||||
{% bootstrap_field form.show_quota_left layout="control" %}
|
||||
{% if form.grant_membership_type %}
|
||||
{% bootstrap_field form.grant_membership_type layout="control" %}
|
||||
<div data-display-dependency="#id_grant_membership_type">
|
||||
@@ -206,8 +247,11 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% bootstrap_field form.show_quota_left layout="control" %}
|
||||
{% for f in plugin_forms %}
|
||||
{% bootstrap_form f layout="control" %}
|
||||
{% if not f.is_layouts %}
|
||||
{% bootstrap_form f layout="control" %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
{% if position.valid_from %}
|
||||
<br />
|
||||
{% endif %}
|
||||
{% blocktrans trimmed with datetime=position.valid_from|date:"SHORT_DATETIME_FORMAT" %}
|
||||
{% blocktrans trimmed with datetime=position.valid_until|date:"SHORT_DATETIME_FORMAT" %}
|
||||
Valid until {{ datetime }}
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{% extends "pretixcontrol/event/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
{% load daterange %}
|
||||
{% load eventurl %}
|
||||
{% load money %}
|
||||
{% load rich_text %}
|
||||
@@ -446,8 +447,8 @@
|
||||
<dd>
|
||||
<span class="fa fa-clock-o fa-fw" aria-hidden="true"></span>
|
||||
{% if line.valid_from and line.valid_until %}
|
||||
{% blocktrans trimmed with datetime_from=line.valid_from|date:"SHORT_DATETIME_FORMAT" datetime_until=line.valid_until|date:"SHORT_DATETIME_FORMAT" %}
|
||||
Valid from {{ datetime_from }} until {{ datetime_until }}
|
||||
{% blocktrans trimmed with datetime_range=line.valid_from|datetimerange:line.valid_until %}
|
||||
Valid {{ datetime_range }}
|
||||
{% endblocktrans %}
|
||||
{% elif line.valid_from %}
|
||||
{% blocktrans trimmed with datetime=line.valid_from|date:"SHORT_DATETIME_FORMAT" %}
|
||||
|
||||
Reference in New Issue
Block a user