mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Replace Item.hidden_if_available with relationship to other Item (#3686)
* draft * Implementation that is closer to old one * Fix tests * Add tests * Update src/pretix/control/forms/item.py Co-authored-by: Richard Schreiber <schreiber@rami.io> * Review notes --------- Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
@@ -32,6 +32,14 @@
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not request.event.has_subevents and object.hidden_if_item_available and object.hidden_if_item_available.check_quotas.0 == 100 %}
|
||||
<div class="alert alert-warning">
|
||||
{% blocktrans trimmed %}
|
||||
This product is currently not being shown since you configured below that it should only be visible
|
||||
if a certain other product is already sold out.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% block inside %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -169,7 +169,10 @@
|
||||
{% endif %}
|
||||
{% bootstrap_field form.allow_cancel layout="control" %}
|
||||
{% bootstrap_field form.allow_waitinglist layout="control" %}
|
||||
{% bootstrap_field form.hidden_if_available layout="control" %}
|
||||
{% if form.hidden_if_available %}
|
||||
{% bootstrap_field form.hidden_if_available layout="control" %}
|
||||
{% endif %}
|
||||
{% bootstrap_field form.hidden_if_item_available layout="control" %}
|
||||
</fieldset>
|
||||
{% for v in formsets.values %}
|
||||
<fieldset>
|
||||
|
||||
Reference in New Issue
Block a user