forked from CGM_Public/pretix_original
Gift card payment: Clean-up some code (#5574)
* Remove apparently unused code * Move templates that do not belong in pretixcontrol
This commit is contained in:
@@ -1377,7 +1377,7 @@ class GiftCardPayment(BasePaymentProvider):
|
|||||||
execute_payment_needs_user = False
|
execute_payment_needs_user = False
|
||||||
verbose_name = _("Gift card")
|
verbose_name = _("Gift card")
|
||||||
payment_form_class = GiftCardPaymentForm
|
payment_form_class = GiftCardPaymentForm
|
||||||
payment_form_template_name = 'pretixcontrol/giftcards/checkout.html'
|
payment_form_template_name = 'pretixpresale/giftcard/checkout.html'
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def customer_gift_cards(self):
|
def customer_gift_cards(self):
|
||||||
@@ -1504,7 +1504,7 @@ class GiftCardPayment(BasePaymentProvider):
|
|||||||
return super().order_change_allowed(order) and self.event.organizer.has_gift_cards
|
return super().order_change_allowed(order) and self.event.organizer.has_gift_cards
|
||||||
|
|
||||||
def checkout_confirm_render(self, request, order=None, info_data=None) -> str:
|
def checkout_confirm_render(self, request, order=None, info_data=None) -> str:
|
||||||
return get_template('pretixcontrol/giftcards/checkout_confirm.html').render({
|
return get_template('pretixpresale/giftcard/checkout_confirm.html').render({
|
||||||
'info_data': info_data,
|
'info_data': info_data,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -9,34 +9,6 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block inner %}
|
{% block inner %}
|
||||||
<h3 class="sr-only">{% trans "Payment" %}</h3>
|
<h3 class="sr-only">{% trans "Payment" %}</h3>
|
||||||
{% if customer_gift_cards %}
|
|
||||||
<p><strong>
|
|
||||||
<span class="sr-only">{% trans "Information" %}</span>
|
|
||||||
{% trans "The following gift cards are available in your customer account:" %}
|
|
||||||
</strong></p>
|
|
||||||
<form method="post">
|
|
||||||
{% csrf_token %}
|
|
||||||
<ul class="list-group">
|
|
||||||
{% for c in customer_gift_cards %}
|
|
||||||
<li class="list-group-item row">
|
|
||||||
<div class="col-xs-9" id="gc-code-{{ forloop.counter }}">
|
|
||||||
{{ c }}
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-2 text-right" id="gc-value-{{ forloop.counter }}">
|
|
||||||
{{ c.value|money:c.currency }}
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-1 text-right">
|
|
||||||
<button name="use_giftcard" value="{{ c.secret }}" title="{% trans "Use gift card" %}"
|
|
||||||
aria-describedby="gc-code-{{ forloop.counter }} gc-value-{{ forloop.counter }}"
|
|
||||||
class="btn btn-primary btn-xs">
|
|
||||||
{% trans "Apply" %}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
{% if current_payments %}
|
{% if current_payments %}
|
||||||
<p>{% trans "You already selected the following payment methods:" %}</p>
|
<p>{% trans "You already selected the following payment methods:" %}</p>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
|
|||||||
Reference in New Issue
Block a user