<fieldset class="hide">
    <h1>
        <a class="show el">
            Delivery Methods <i class="fa fa-caret-down"></i>
        </a>
    </h1>

    <div class="row checkboxes">
        <label class="master">
            Apply
        </label>
        <input type="radio"
               name="delivery_methods_all"
               id="delivery_methods_all_yes"
               class="delivery_methods_all"
               value="1"
               {{ itemDeliveryMethods is empty ? 'checked' : '' }}
        />
        <label for="delivery_methods_all_yes">
            All by default
        </label>

        <input type="radio"
               name="delivery_methods_all"
               id="delivery_methods_all_no"
               class="delivery_methods_all"
               value="0"
                {{ itemDeliveryMethods is not empty ? 'checked' : '' }}
        />
        <label for="delivery_methods_all_no">
            Allowed for product
        </label>
    </div>

    <div class="row">
        <div id="itemDeliveryMethodSelection">
            <label class="master">
                Allowed delivery methods:
            </label>

            {% for deliveryMethod in deliveryMethods %}
                <div class="row">
                    <input type="checkbox"
                           name="item_delivery_methods[]"
                           id="item_delivery_method_{{ deliveryMethod.id }}"
                           value="{{ deliveryMethod.id }}"
                            {{ deliveryMethod.id in itemDeliveryMethods ? 'checked' : '' }}
                    />
                    <label for="item_delivery_method_{{ deliveryMethod.id }}">
                        {{ deliveryMethod.name }}
                    </label>
                </div>
            {% endfor %}
        </div>
    </div>
</fieldset>
