Commit bfd8fce3 authored by Marie Simon's avatar Marie Simon Committed by Sébastiaan Versteeg
Browse files

Disable payment button for Thalia Pay in payment widget

parent 9f9eb192
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
<a data-href="{% url 'admin:payments_payment_process' pk=payment.pk %}" <a data-href="{% url 'admin:payments_payment_process' pk=payment.pk %}"
data-next="true" data-type="card_payment" data-next="true" data-type="card_payment"
class="button process">{% trans "Process (card payment)" %}</a> class="button process">{% trans "Process (card payment)" %}</a>
{% if widget.value %} {% if widget.value and payment.paid_by.tpay_enabled %}
<a data-href="{% url 'admin:payments_payment_process' pk=payment.pk %}" <a data-href="{% url 'admin:payments_payment_process' pk=payment.pk %}"
data-next="true" data-type="tpay_payment" data-next="true" data-type="tpay_payment"
class="button process">{% trans "Process (Thalia Pay payment)" %}</a> class="button process">{% trans "Process (Thalia Pay payment)" %}</a>
{% else %} {% else %}
<div class="button" disabled>{% trans "Process (Thalia Pay payment)" %}</div> <a class="button" disabled>{% trans "Process (Thalia Pay payment)" %}</a>
{% endif %} {% endif %}
<a data-href="{% url 'admin:payments_payment_process' pk=payment.pk %}" <a data-href="{% url 'admin:payments_payment_process' pk=payment.pk %}"
data-next="true" data-type="wire_payment" data-next="true" data-type="wire_payment"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment