Show warning on incompatible waiting list options (#5218)

If "Hide all products that are sold out" is enabled, the waiting list won't work.
This commit is contained in:
luelista
2025-06-13 11:01:18 +02:00
committed by GitHub
parent 5420f57aa2
commit b5f8438c18
2 changed files with 22 additions and 1 deletions

View File

@@ -247,6 +247,17 @@
{% bootstrap_field sform.show_variations_expanded layout="control" %}
{% bootstrap_field sform.hide_sold_out layout="control" %}
<div data-display-dependency="#id_settings-waiting_list_enabled">
<div data-display-dependency="#id_settings-hide_sold_out">
<div class="alert alert-danger dynamic">
<h4>{% trans "Incompatible settings" %}</h4>
{% blocktrans trimmed %}
Customers won't be able to add themselves to the waiting list, because "Hide all products that are sold out" is enabled.
{% endblocktrans %}
</div>
</div>
</div>
<h4>{% trans "Calendar and list views" context "subevents" %}</h4>
{% if sform.frontpage_subevent_ordering %}
{% bootstrap_field sform.frontpage_subevent_ordering layout="control" %}
@@ -372,6 +383,16 @@
</strong>
</div>
{% bootstrap_field sform.waiting_list_enabled layout="control" %}
<div data-display-dependency="#id_settings-hide_sold_out">
<div data-display-dependency="#id_settings-waiting_list_enabled">
<div class="alert alert-danger dynamic">
<h4>{% trans "Incompatible settings" %}</h4>
{% blocktrans trimmed %}
Customers won't be able to add themselves to the waiting list, because "Hide all products that are sold out" is enabled.
{% endblocktrans %}
</div>
</div>
</div>
{% bootstrap_field sform.waiting_list_auto layout="control" %}
<div class="form-group">
<label class="control-label col-md-3">