forked from CGM_Public/pretix_original
Fixed #106 -- added pay-what-you-want tickets
This commit is contained in:
@@ -28,12 +28,17 @@
|
||||
<form action="{% eventurl event "presale:event.cart.remove" %}"
|
||||
method="post" data-asynctask>
|
||||
{% 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="{{ line.price }}" />
|
||||
{% else %}
|
||||
<input type="hidden" name="item_{{ line.item.id }}"
|
||||
value="1" />
|
||||
<input type="hidden" name="price_{{ line.item.id }}"
|
||||
value="{{ line.price }}" />
|
||||
{% endif %}
|
||||
<button class="btn btn-mini btn-link"><i class="fa fa-minus"></i></button>
|
||||
</form>
|
||||
@@ -46,9 +51,13 @@
|
||||
{% 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="{{ line.price }}" />
|
||||
{% else %}
|
||||
<input type="hidden" name="item_{{ line.item.id }}"
|
||||
value="1" />
|
||||
<input type="hidden" name="price_{{ line.item.id }}"
|
||||
value="{{ line.price }}" />
|
||||
{% endif %}
|
||||
<button class="btn btn-mini btn-link"><i class="fa fa-plus"></i></button>
|
||||
</form>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
{% if item.description %}<p>{{ item.description }}</p>{% endif %}
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-6 price">
|
||||
{% if item.min_price != item.max_price %}
|
||||
{% if item.min_price != item.max_price or item.free_price %}
|
||||
{% blocktrans trimmed with minprice=item.min_price|floatformat:2 currency=event.currency %}
|
||||
from {{ currency }} {{ minprice }}
|
||||
{% endblocktrans %}
|
||||
@@ -101,7 +101,18 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-6 price">
|
||||
{{ event.currency }} {{ var.price|floatformat:2 }}
|
||||
{% if item.free_price %}
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{{ event.currency }}</span>
|
||||
<input type="number" class="form-control input-item-price"
|
||||
placeholder="0"
|
||||
min="{{ var.price|stringformat:"0.2f" }}"
|
||||
name="price_{{ item.id }}_{{ var.id }}"
|
||||
step="0.01" value="{{ var.price|stringformat:"0.2f" }}">
|
||||
</div>
|
||||
{% else %}
|
||||
{{ event.currency }} {{ var.price|floatformat:2 }}
|
||||
{% endif %}
|
||||
{% if item.tax_rate %}
|
||||
<br/>
|
||||
<small>{% blocktrans trimmed with rate=item.tax_rate %}
|
||||
@@ -135,13 +146,24 @@
|
||||
</a>
|
||||
{% endif %}
|
||||
<strong>{{ item.name }}</strong>
|
||||
{% if item.description %}<p class="description">{{ item.description }}</p>{% endif %}
|
||||
{% if item.description %}
|
||||
<p class="description">{{ item.description }}</p>{% endif %}
|
||||
{% if event.settings.show_quota_left %}
|
||||
{% include "pretixpresale/event/fragment_quota_left.html" with avail=item.cached_availability %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-6 price">
|
||||
{{ event.currency }} {{ item.price|floatformat:2 }}
|
||||
{% if item.free_price %}
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{{ event.currency }}</span>
|
||||
<input type="number" class="form-control input-item-price" placeholder="0"
|
||||
min="{{ item.price|stringformat:"0.2f" }}"
|
||||
name="price_{{ item.id }}"
|
||||
step="0.01" value="{{ item.price|stringformat:"0.2f" }}">
|
||||
</div>
|
||||
{% else %}
|
||||
{{ event.currency }} {{ item.price|floatformat:2 }}
|
||||
{% endif %}
|
||||
{% if item.tax_rate %}
|
||||
<br/>
|
||||
<small>{% blocktrans trimmed with rate=item.tax_rate %}
|
||||
|
||||
Reference in New Issue
Block a user