Commit ead6d627 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch...

Merge branch '980-thalia-pay-process-button-enabled-in-payments-widget-even-though-tpay_enabled-false' into 'master'

Disable payment button for Thalia Pay in payment widget

Closes #980

See merge request !1501
parents 9f9eb192 bfd8fce3
......@@ -14,12 +14,12 @@
<a data-href="{% url 'admin:payments_payment_process' %}"
data-next="true" data-type="card_payment"
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' %}"
data-next="true" data-type="tpay_payment"
class="button process">{% trans "Process (Thalia Pay payment)" %}</a>
{% else %}
<div class="button" disabled>{% trans "Process (Thalia Pay payment)" %}</div>
<a class="button" disabled>{% trans "Process (Thalia Pay payment)" %}</a>
{% endif %}
<a data-href="{% url 'admin:payments_payment_process' %}"
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