Re-label cart button if cart is not visible or all products are free

This commit is contained in:
Raphael Michel
2020-04-20 19:05:21 +02:00
parent 234bf093ff
commit 4e59b02bb1
5 changed files with 40 additions and 2 deletions

View File

@@ -189,6 +189,7 @@
</div>
<div class="col-md-4 col-md-offset-4">
<button class="btn btn-block btn-primary btn-lg" type="submit">
<span class="fa fa-lock"></span>
{% if cart.total > 0 %}
{% trans "Place binding order" %}
{% else %}

View File

@@ -241,7 +241,15 @@
<div class="row-fluid">
<div class="col-md-4 col-md-offset-8 col-xs-12">
<button class="btn btn-block btn-primary btn-lg" type="submit" id="btn-add-to-cart">
<i class="fa fa-shopping-cart"></i> {% trans "Add to cart" %}
{% if request.event.settings.redirect_to_checkout_directly %}
{% if allfree %}
<i class="fa fa-check"></i> {% trans "Register" %}
{% else %}
<i class="fa fa-shopping-cart"></i> {% trans "Proceed with checkout" %}
{% endif %}
{% else %}
<i class="fa fa-shopping-cart"></i> {% trans "Add to cart" %}
{% endif %}
</button>
</div>
<div class="clearfix"></div>

View File

@@ -338,7 +338,15 @@
<div class="row-fluid checkout-button-row">
<div class="col-md-4 col-md-offset-8 col-xs-12">
<button class="btn btn-block btn-primary btn-lg" id="btn-add-to-cart" type="submit">
<i class="fa fa-shopping-cart"></i> {% trans "Add to cart" %}
{% if request.event.settings.redirect_to_checkout_directly %}
{% if allfree %}
<i class="fa fa-check"></i> {% trans "Register" %}
{% else %}
<i class="fa fa-shopping-cart"></i> {% trans "Proceed with checkout" %}
{% endif %}
{% else %}
<i class="fa fa-shopping-cart"></i> {% trans "Add to cart" %}
{% endif %}
</button>
</div>
<div class="clearfix"></div>