Order cancellation: Allow to set step size for fee amount

This commit is contained in:
Raphael Michel
2021-01-15 12:18:51 +01:00
parent 00667aff11
commit 18eedd8a5f
7 changed files with 51 additions and 4 deletions

View File

@@ -62,13 +62,20 @@
value="{{ cancel_fee|stringformat:".2f" }}"
data-slider-min="{{ cancel_fee|stringformat:".2f" }}"
data-slider-value="{{ cancel_fee|stringformat:".2f" }}"
data-slider-step="0.01"
data-slider-max="{{ order.payment_refund_sum|stringformat:".2f" }}"
{% if request.event.settings.cancel_allow_user_paid_adjust_fees_step %}
data-slider-ticks="{{ ticks }}"
data-slider-lock-to-ticks="true"
{% else %}
data-slider-step="0.01"
{% endif %}
data-slider-max="{{ payment_refund_sum|stringformat:".2f" }}"
data-slider-tooltip="hide"/>
<div id="cancel-fee-refund"></div>
</div>
<div class="text-center" id="cancel-fee-custom-link">
<a id="cancel-fee-custom"><small>{% trans "Enter custom amount" %}</small></a>
{% if not request.event.settings.cancel_allow_user_paid_adjust_fees_step %}
<a id="cancel-fee-custom"><small>{% trans "Enter custom amount" %}</small></a>
{% endif %}
</div>
{% else %}
<p>