<div class="modal fade" id="inpostDeliveryServiceModal" tabindex="-1" role="dialog" aria-labelledby="inpostDeliveryServiceLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="inpostDeliveryServiceLabel">{{ text_add_delivery_service }}</h4>
            </div>
            <div class="modal-body">
                <form action="#" method="post" enctype="multipart/form-data" id="form-delivery-service" class="form-horizontal">
                    <div class="form-group">
                        <label for="inpostDeliveryService" class="col-sm-2 control-label">{{ entry_delivery_service }}</label>
                        <div class="col-sm-10">
                            <select name="deliveryService" id="inpostDeliveryService" class="form-control">
                                <option value="">{{ text_select_delivery_service }}</option>
                                {% for service in apiDeliveryServices %}
                                    <option value="{{ service.id }}" {% if service.id == deliveryService %} selected="selected" {% endif %}>{{ service.description }}</option>
                                {% endfor %}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="inpostCod">{{ entry_inpost_cod }}</label>
                        <div class="col-sm-10">
{#                            <input type="hidden" name="cod" value="0" />#}
                            <input type="checkbox" name="cod" id="inpostCod" class="js-switch" value="1" {% if cod %} checked="checked" {% endif %} />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="inpostWeekendDelivery">{{ entry_weekend_delivery }}</label>
                        <div class="col-sm-10">
{#                            <input type="hidden" name="weekendDelivery" value="0" />#}
                            <input type="checkbox" name="weekendDelivery" id="inpostWeekendDelivery" value="1" class="js-switch" {% if weekendDelivery %} checked="checked" {% endif %} />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inpostShippingMethod" class="col-sm-2 control-label">{{ entry_shipping_method }}</label>
                        <div class="col-sm-10">
                            <select name="shippingMethod" id="inpostShippingMethod" class="form-control" data-offer="{{ shippingMethod ? shippingMethod }}">
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="input-inpostUseProductDimensions"></label>
                        <div class="col-sm-10">
{#                            <input type="hidden" name="useProductDimensions" value="0" />#}
                            <input type="checkbox" name="useProductDimensions" id="inpostUseProductDimensions" class="js-switch" value="1" {{ useProductDimensions ? 'checked="checked"' }} />
                            <span>{{ entry_use_product_dimensions }}</span>
                        </div>
                    </div>
                    <div class="form-group required sizeTemplateWrapper" style="display: none;">
                        <label class="col-sm-2 control-label" for="input-inpostDefaultSizeTemplate">{{ text_default_size_template }}</label>
                        <div class="col-sm-10">
                            <select name="sizeTemplate" id="inpostDefaultSizeTemplate" class="form-control">
                                <option value="size_a" {% if sizeTemplate == 'size_a' %} selected="selected" {% endif %}>{{ text_size_a }}</option>
                                <option value="size_b" {% if sizeTemplate == 'size_b' %} selected="selected" {% endif %}>{{ text_size_b }}</option>
                                <option value="size_c" {% if sizeTemplate == 'size_c' %} selected="selected" {% endif %}>{{ text_size_c }}</option>
                                <option value="size_d" {% if sizeTemplate == 'size_d' %} selected="selected" {% endif %}>{{ text_size_d }}</option>
                            </select>
                        </div>
                    </div>
                    <div class="dimensionsWrapper">
                        <div class="form-group">
                            <div class="col-sm-12 text-center"><h4>{{ text_default_dimensions }}</h4></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="input-inpostLength">{{ entry_length }}</label>
                            <div class="col-sm-10">
                                <div class="input-group">
                                    <input type="text" name="length" id="inpostLength" class="form-control" placeholder="{{ entry_length }}" value="{{ length }}" />
                                    <span class="input-group-addon">{{ text_mm }}</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="input-inpostWidth">{{ entry_width }}</label>
                            <div class="col-sm-10">
                                <div class="input-group">
                                    <input type="text" name="width" id="inpostWidth" class="form-control" placeholder="{{ entry_width }}" value="{{ width }}" />
                                    <span class="input-group-addon">{{ text_mm }}</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="input-inpostHeight">{{ entry_height }}</label>
                            <div class="col-sm-10">
                                <div class="input-group">
                                    <input type="text" name="height" id="inpostHeight" class="form-control" placeholder="{{ entry_height }}" value="{{ height }}" />
                                    <span class="input-group-addon">{{ text_mm }}</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="input-inpostWeight">{{ entry_weight }}</label>
                            <div class="col-sm-10">
                                <div class="input-group">
                                    <input type="text" name="weight" id="inpostWeight" class="form-control" placeholder="{{ entry_weight }}" value="{{ weight }}">
                                    <span class="input-group-addon">{{ text_kg }}</span>
                                </div>
                            </div>
                        </div>
                    </div>
{#                    <div class="form-group">#}
{#                        <label class="col-sm-2 control-label" for="input-use-existing-carrier">{{ entry_use_existing_carrier }}</label>#}
{#                        <div class="col-sm-10">#}
{#                            <input type="checkbox" name="useExistingCarrier" value="" id="inpostUseExistingCarrier" class="form-control" />#}
{#                        </div>#}
{#                    </div>#}
                    <div class="form-group required">
                        <label class="col-sm-2 control-label" for="input-inpostCarrierName">{{ entry_carrier_name }}</label>
                        <div class="col-sm-10">
                            <div class="input-group">
                                <input type="text" name="carrierName" id="inpostCarrierName" value="{{ carrierName ? carrierName }}" class="form-control" placeholder="{{ entry_carrier_name }}">
                                <span class="input-group-btn">
                                    <button type="button" class="btn btn-default" id="inpostFillCarrierName">{{ text_button_fill_carrier_name }}</button>
                                </span>
                            </div>
                        </div>
                    </div>
                    <input type="hidden" name="deliveryServiceId" id="deliveryServiceId" value="{{ id_delivery_service ? id_delivery_service : 0 }}" />
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" id="button-close-delivery-service-modal">Close</button>
                <button type="button" class="btn btn-primary" id="button-submit-delivery-service-form">Save</button>
            </div>
        </div>
    </div>
</div>