Preselect product if only one is selectable

This commit is contained in:
Raphael Michel
2018-04-19 18:06:57 +02:00
parent 62dfd7cef0
commit 8f2adf0a50
2 changed files with 3 additions and 2 deletions

View File

@@ -410,12 +410,12 @@
<div class="col-md-2 col-xs-6 availability-box available">
{% if item.max_per_order == 1 %}
<label class="item-checkbox-label">
<input type="checkbox" value="1"
<input type="checkbox" value="1" {% if itemnum == 1 %}checked{% endif %}
name="item_{{ item.id }}">
</label>
{% else %}
<input type="number" class="form-control input-item-count" placeholder="0" min="0"
pattern="\d*"
pattern="\d*" {% if itemnum == 1 %}value="1"{% endif %}
max="{{ item.order_max }}" name="item_{{ item.id }}">
{% endif %}
</div>