Hide fees on changing payment method when no fees are taken

This commit is contained in:
Raphael Michel
2019-07-25 11:47:23 +02:00
parent 4857cfad6e
commit 2dd75ea252
2 changed files with 4 additions and 1 deletions

View File

@@ -23,7 +23,9 @@
<div class="panel-heading">
<h4 class="panel-title">
<label class="radio">
<strong class="pull-right">{% if p.fee_diff >= 0 %}+{% else %}-{% endif %} {{ p.fee_diff_abs|money:event.currency }}</strong>
{% if show_fees %}
<strong class="pull-right">{% if p.fee_diff >= 0 %}+{% else %}-{% endif %} {{ p.fee_diff_abs|money:event.currency }}</strong>
{% endif %}
<input type="radio" name="payment" value="{{ p.provider.identifier }}"
data-parent="#payment_accordion"
{% if selected == p.provider.identifier %}checked="checked"{% endif %}

View File

@@ -581,6 +581,7 @@ class OrderPayChangeMethod(EventViewMixin, OrderDetailMixin, TemplateView):
ctx = super().get_context_data(**kwargs)
ctx['order'] = self.order
ctx['providers'] = self.provider_forms
ctx['show_fees'] = any(p['fee_diff'] for p in self.provider_forms)
return ctx
def get_confirm_url(self, payment):