{{ header }}{{ column_left }}
<div id="content">
    <div class="page-header">
        <div class="container-fluid">
            <div class="pull-right">
                <a class="btn btn-info" href="index.php?route=extension/shipping/inpost_shipping/shipmentsList&user_token={{ user_token }}">{{ entry_view_shipment_list }}</a>
                <button type="submit" form="form-shipping" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
                <a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
            <h1>{{ heading_title }}</h1>
            <ul class="breadcrumb">
                {% for breadcrumb in breadcrumbs %}
                    <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
                {% endfor %}
            </ul>
        </div>
    </div>
    <div class="container-fluid">
        {% if error_warning %}
            <div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
                <button type="button" class="close" data-dismiss="alert">&times;</button>
            </div>
        {% endif %}
        {% if success %}
            <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
                <button type="button" class="close" data-dismiss="alert">&times;</button>
            </div>
        {% endif %}
        {% if shipping_inpost_shipping_sandbox_mode %}
            <div class="alert alert-warning">
                <i class="fa fa-exclamation-triangle"></i> {{ text_sandbox_mode_enabled }}
            </div>
        {% endif %}
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
            </div>
            <div class="panel-body">
                <form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-shipping" class="form-horizontal">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
                        <li><a href="#tab-geowidget" data-toggle="tab">{{ tab_geowidget }}</a></li>
                        <li><a href="#tab-settings" data-toggle="tab">{{ tab_settings }}</a></li>
                        <li><a href="#tab-sender-details" data-toggle="tab">{{ tab_sender_details }}</a></li>
                        <li><a href="#tab-shipment-method" data-toggle="tab">{{ tab_shipment_method }}</a></li>
                        <li><a href="#tab-delivery-services" data-toggle="tab">{{ tab_delivery_services }}</a></li>
                        <li><a href="#tab-weekend-package" data-toggle="tab">{{ tab_weekend_package }}</a></li>
                        <li><a href="#tab-pickup-points" data-toggle="tab">{{ tab_pickup_points }}</a></li>
                        <li><a href="#tab-orders" data-toggle="tab">{{ tab_orders }}</a></li>
                        <li><a href="#tab-quick-returns" data-toggle="tab">{{ tab_quick_returns }}</a></li>
                        <li><a href="#tab-support" data-toggle="tab">{{ tab_support }}</a></li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="tab-general">
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
                                <div class="col-sm-10">
                                    <select name="shipping_inpost_shipping_status" id="input-status" class="form-control">
                                        {% if shipping_inpost_shipping_status %}
                                            <option value="1" selected="selected">{{ text_enabled }}</option>
                                            <option value="0">{{ text_disabled }}</option>
                                        {% else %}
                                            <option value="1">{{ text_enabled }}</option>
                                            <option value="0" selected="selected">{{ text_disabled }}</option>
                                        {% endif %}
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-sandbox-mode">{{ entry_sandbox_mode }}</label>
                                <div class="col-sm-10">
                                    <select name="shipping_inpost_shipping_sandbox_mode" id="input-sandbox-mode" class="form-control">
                                        {% if shipping_inpost_shipping_sandbox_mode %}
                                            <option value="1" selected="selected">{{ text_enabled }}</option>
                                            <option value="0">{{ text_disabled }}</option>
                                        {% else %}
                                            <option value="1">{{ text_enabled }}</option>
                                            <option value="0" selected="selected">{{ text_disabled }}</option>
                                        {% endif %}
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-api-key">{{ entry_api_key }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_api_key" value="{{ shipping_inpost_shipping_api_key }}" placeholder="{{ entry_api_key }}" id="input-api-key" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-organization-id">{{ entry_organization_id }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_organization_id" value="{{ shipping_inpost_shipping_organization_id }}" placeholder="{{ entry_organization_id }}" id="input-organization-id" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-sandbox-api-key">{{ entry_sandbox_api_key }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_sandbox_api_key" value="{{ shipping_inpost_shipping_sandbox_api_key }}" placeholder="{{ entry_sandbox_api_key }}" id="input-api-key" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-sandbox-organization-id">{{ entry_sandbox_organization_id }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_sandbox_organization_id" value="{{ shipping_inpost_shipping_sandbox_organization_id }}" placeholder="{{ entry_sandbox_organization_id }}" id="input-sandbox-organization-id" class="form-control" />
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="tab-geowidget">
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-geowidget-api-key">{{ entry_geowidget_api_key }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_geowidget_api_key" value="{{ shipping_inpost_shipping_geowidget_api_key }}" placeholder="{{ entry_geowidget_api_key }}" id="input-geowidget-api-key" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-geowidget-sandbox-api-key">{{ entry_geowidget_sandbox_api_key }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_geowidget_sandbox_api_key" value="{{ shipping_inpost_shipping_geowidget_sandbox_api_key }}" placeholder="{{ entry_geowidget_sandbox_api_key }}" id="input-geowidget-sandbox-api-key" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-geowidget-sandbox-checkout">{{ entry_geowidget_sandbox_checkout }}</label>
                                <div class="col-sm-10">
                                    <input type="checkbox" name="shipping_inpost_shipping_geowidget_sandbox_checkout" {{ shipping_inpost_shipping_geowidget_sandbox_checkout ? 'checked' }} class="js-switch">
{#                                    {% if shipping_inpost_shipping_geowidget_sandbox_checkout %}#}
{#                                        <input type="checkbox" name="shipping_inpost_shipping_geowidget_sandbox_checkout" checked="checked" placeholder="{{ entry_geowidget_sandbox_checkout }}" id="input-geowidget-sandbox-checkout" class="form-control" />#}
{#                                    {% else %}#}
{#                                        <input type="checkbox" name="shipping_inpost_shipping_geowidget_sandbox_checkout" placeholder="{{ entry_geowidget_sandbox_checkout }}" id="input-geowidget-sandbox-checkout" class="form-control" />#}
{#                                    {% endif %}#}
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="tab-settings">
                            <h3 class="text-center {% if shipping_inpost_shipping_settings['shippingMethods'] %} hidden {% endif %}">{{ text_no_shipping_methods }}</h3>
                            {% if shipping_inpost_shipping_settings['shippingMethods'] %}
                                {{ shipping_inpost_shipping_settings['shippingMethods']|raw }}
                            {% endif %}
                            <div class="row">
                                <div class="col-sm-12 text-right">
                                    <hr>
                                    <button type="button" class="btn btn-primary" id="button-new-shipping-method" data-toggle="modal" data-target="#inpostPickupPointModal"><i class="fa fa-plus-circle"></i></button>
                                </div>
                            </div>
{#                            <div class="form-group">#}
{#                                <label class="col-sm-2 control-label" for="input-cost">{{ entry_cost }}</label>#}
{#                                <div class="col-sm-10">#}
{#                                    <input type="text" name="shipping_inpost_shipping_cost" value="{{ shipping_inpost_shipping_cost }}" placeholder="{{ entry_cost }}" id="input-cost" class="form-control" />#}
{#                                </div>#}
{#                            </div>#}
{#                            <div class="form-group">#}
{#                                <label class="col-sm-2 control-label" for="input-tax-class">{{ entry_tax_class }}</label>#}
{#                                <div class="col-sm-10">#}
{#                                    <select name="shipping_inpost_shipping_tax_class_id" id="input-tax-class" class="form-control">#}
{#                                        <option value="0">{{ text_none }}</option>#}
{#                                        {% for tax_class in tax_classes %}#}
{#                                            {% if tax_class.tax_class_id == shipping_inpost_shipping_tax_class_id %}#}
{#                                                <option value="{{ tax_class.tax_class_id }}" selected="selected">{{ tax_class.title }}</option>#}
{#                                            {% else %}#}
{#                                                <option value="{{ tax_class.tax_class_id }}">{{ tax_class.title }}</option>#}
{#                                            {% endif %}#}
{#                                        {% endfor %}#}
{#                                    </select>#}
{#                                </div>#}
{#                            </div>#}
{#                            <div class="form-group">#}
{#                                <label class="col-sm-2 control-label" for="input-geo-zone">{{ entry_geo_zone }}</label>#}
{#                                <div class="col-sm-10">#}
{#                                    <select name="shipping_inpost_shipping_geo_zone_id" id="input-geo-zone" class="form-control">#}
{#                                        <option value="0">{{ text_all_zones }}</option>#}
{#                                        {% for geo_zone in geo_zones %}#}
{#                                            {% if geo_zone.geo_zone_id == shipping_inpost_shipping_geo_zone_id %}#}
{#                                                <option value="{{ geo_zone.geo_zone_id }}" selected="selected">{{ geo_zone.name }}</option>#}
{#                                            {% else %}#}
{#                                                <option value="{{ geo_zone.geo_zone_id }}">{{ geo_zone.name }}</option>#}
{#                                            {% endif %}#}
{#                                        {% endfor %}#}
{#                                    </select>#}
{#                                </div>#}
{#                            </div>#}
{#                            <div class="form-group">#}
{#                                <label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>#}
{#                                <div class="col-sm-10">#}
{#                                    <input type="text" name="shipping_inpost_shipping_sort_order" value="{{ shipping_inpost_shipping_sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />#}
{#                                </div>#}
{#                            </div>#}
                        </div>
                        <div class="tab-pane" id="tab-sender-details">
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-shipping-company">{{ entry_shipping_company }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_settings[company]" value="{{ shipping_inpost_shipping_settings['company'] }}" placeholder="{{ entry_shipping_company }}" id="input-shipping-company" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-shipping-firstname">{{ entry_shipping_firstname }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_settings[firstname]" value="{{ shipping_inpost_shipping_settings['firstname'] }}" placeholder="{{ entry_shipping_firstname }}" id="input-shipping-firstname" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-shipping-lastname">{{ entry_shipping_lastname }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_settings[lastname]" value="{{ shipping_inpost_shipping_settings['lastname'] }}" placeholder="{{ entry_shipping_lastname }}" id="input-shipping-lastname" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-shipping-email">{{ entry_shipping_email }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_settings[email]" value="{{ shipping_inpost_shipping_settings['email'] }}" placeholder="{{ entry_shipping_email }}" id="input-shipping-email" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-shipping-phone">{{ entry_shipping_phone }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_settings[phone]" value="{{ shipping_inpost_shipping_settings['phone'] }}" placeholder="{{ entry_shipping_phone }}" id="input-shipping-phone" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-shipping-street">{{ entry_shipping_street }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_settings[street]" value="{{ shipping_inpost_shipping_settings['street'] }}" placeholder="{{ entry_shipping_street }}" id="input-shipping-street" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-shipping-house">{{ entry_shipping_house }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_settings[house]" value="{{ shipping_inpost_shipping_settings['house'] }}" placeholder="{{ entry_shipping_house }}" id="input-shipping-house" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-shipping-city">{{ entry_shipping_city }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_settings[city]" value="{{ shipping_inpost_shipping_settings['city'] }}" placeholder="{{ entry_shipping_city }}" id="input-shipping-city" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-shipping-postcode">{{ entry_shipping_postcode }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_settings[postcode]" value="{{ shipping_inpost_shipping_settings['postcode'] }}" placeholder="{{ entry_shipping_postcode }}" id="input-shipping-postcode" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-12 text-right">
                                    <button type="button" id="load-organization-data" class="btn btn-primary">{{ entry_load_organization_data }}</button>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="tab-shipment-method">
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-default-pickup-point">{{ entry_default_pickup_point }}</label>
                                <div class="col-sm-10">
                                    <select name="shipping_inpost_shipping_settings[default_pickup_point]" class="form-control" id="input-default-pickup-point">
                                        {% if not pickupPoints %}
                                            <option value=""> --- </option>
                                        {% else %}
                                            {% for point in pickupPoints %}
                                            <option value="{{ point.id_pickup_point }}" {% if point.id_pickup_point == shipping_inpost_shipping_settings.default_pickup_point %} selected="selected" {% endif %}>{{ point.name }}</option>
                                            {% endfor %}
                                        {% endif %}
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-default-parcel-locker">{{ entry_default_parcel_locker }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_settings[default_parcel_locker]" value="{{ shipping_inpost_shipping_settings['default_parcel_locker'] }}" placeholder="{{ entry_click_default_parcel_locker }}" id="input-default-parcel-locker" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-default-pop">{{ entry_default_pop }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_settings[default_pop]" value="{{ shipping_inpost_shipping_settings['default_pop'] }}" placeholder="{{ entry_click_default_pop }}" id="input-default-pop" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-default-order-reference">{{ entry_default_order_reference }}</label>
                                <div class="col-sm-10">
                                    <select name="shipping_inpost_shipping_settings[default_order_reference]" id="input-default-order-reference" class="form-control">
                                        <option value="idOrder" {% if shipping_inpost_shipping_settings.default_order_reference == 'idOrder' %} selected="selected" {% endif %}>{{ entry_id_order }}</option>
                                        <option value="reference" disabled="disabled" {% if shipping_inpost_shipping_settings.default_order_reference == 'reference' %} selected="selected" {% endif %}>{{ entry_reference_order }}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-default-insurance">{{ entry_default_insurance }}</label>
                                <div class="col-sm-10">
                                    <div class="input-group">
                                        <input type="text" name="shipping_inpost_shipping_settings[default_insurance]" value="{{ shipping_inpost_shipping_settings['default_insurance'] }}" placeholder="{{ entry_default_insurance }}" id="input-default-insurance" class="form-control" />
                                        <span class="input-group-addon">zł</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="tab-delivery-services">
                            <h3 class="text-center {% if shipping_inpost_shipping_settings['deliveryServices'] %} hidden {% endif %}">{{ text_no_delivery_services }}</h3>
                            {% if shipping_inpost_shipping_settings['deliveryServices'] %}
                                {{ shipping_inpost_shipping_settings['deliveryServices']|raw }}
                            {% endif %}
                            <div class="row">
                                <div class="col-sm-12 text-right">
                                    <hr>
                                    <button type="button" class="btn btn-primary" id="button-new-delivery-service" data-toggle="modal" data-target="#inpostDeliveryServiceModal">
                                        <i class="fa fa-plus-circle"></i> {{ text_button_add_delivery }}
                                    </button>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="tab-weekend-package">
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-shipping-weekend-day-start">{{ entry_shipping_weekend_day_start }}</label>
                                <div class="col-sm-10">
                                    <select name="shipping_inpost_shipping_settings[weekend_day_start]" id="select-weekend-day-start" class="form-control">
                                        <option value="1" {{ shipping_inpost_shipping_settings['weekend_day_start'] == '1' ? 'selected="selected"' }}>{{ entry_day_monday }}</option>
                                        <option value="2" {{ shipping_inpost_shipping_settings['weekend_day_start'] == '2' ? 'selected="selected"' }}>{{ entry_day_tuesday }}</option>
                                        <option value="3" {{ shipping_inpost_shipping_settings['weekend_day_start'] == '3' ? 'selected="selected"' }}>{{ entry_day_wednesday }}</option>
                                        <option value="4" {{ shipping_inpost_shipping_settings['weekend_day_start'] == '4' ? 'selected="selected"' }}>{{ entry_day_thursday }}</option>
                                        <option value="5" {{ shipping_inpost_shipping_settings['weekend_day_start'] == '5' ? 'selected="selected"' }}>{{ entry_day_friday }}</option>
                                        <option value="6" {{ shipping_inpost_shipping_settings['weekend_day_start'] == '6' ? 'selected="selected"' }}>{{ entry_day_saturday }}</option>
                                        <option value="7" {{ shipping_inpost_shipping_settings['weekend_day_start'] == '7' ? 'selected="selected"' }}>{{ entry_day_sunday }}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-shipping-weekend-time-start">{{ entry_shipping_weekend_time_start }}</label>
                                <div class="col-sm-10">
                                    <div class="input-group time">
                                        <span class="input-group-btn">
                                            <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
                                        </span>
                                        <input type="text" name="shipping_inpost_shipping_settings[weekend_time_start]" data-date-format="HH:mm" value="{{ shipping_inpost_shipping_settings['weekend_time_start'] }}" placeholder="12:00" id="input-shipping-weekend-time-start" class="form-control" />
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-shipping-weekend-day-end">{{ entry_shipping_weekend_day_end }}</label>
                                <div class="col-sm-10">
                                    <select name="shipping_inpost_shipping_settings[weekend_day_end]" id="select-weekend-day-end" class="form-control">
                                        <option value="1" {{ shipping_inpost_shipping_settings['weekend_day_end'] == '1' ? 'selected="selected"' }}>{{ entry_day_monday }}</option>
                                        <option value="2" {{ shipping_inpost_shipping_settings['weekend_day_end'] == '2' ? 'selected="selected"' }}>{{ entry_day_tuesday }}</option>
                                        <option value="3" {{ shipping_inpost_shipping_settings['weekend_day_end'] == '3' ? 'selected="selected"' }}>{{ entry_day_wednesday }}</option>
                                        <option value="4" {{ shipping_inpost_shipping_settings['weekend_day_end'] == '4' ? 'selected="selected"' }}>{{ entry_day_thursday }}</option>
                                        <option value="5" {{ shipping_inpost_shipping_settings['weekend_day_end'] == '5' ? 'selected="selected"' }}>{{ entry_day_friday }}</option>
                                        <option value="6" {{ shipping_inpost_shipping_settings['weekend_day_end'] == '6' ? 'selected="selected"' }}>{{ entry_day_saturday }}</option>
                                        <option value="7" {{ shipping_inpost_shipping_settings['weekend_day_end'] == '7' ? 'selected="selected"' }}>{{ entry_day_sunday }}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-shipping-weekend-time-end">{{ entry_shipping_weekend_time_end }}</label>
                                <div class="col-sm-10">
                                    <div class="input-group time">
                                        <span class="input-group-btn">
                                            <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
                                        </span>
                                        <input type="text" name="shipping_inpost_shipping_settings[weekend_time_end]" data-date-format="HH:mm" value="{{ shipping_inpost_shipping_settings['weekend_time_end'] }}" placeholder="12:00" id="input-shipping-weekend-time-end" class="form-control" />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="tab-pickup-points">
                            <div class="row">
                                <div class="col-sm-12 text-right">
                                    <button type="button" class="btn btn-sm btn-primary" id="inpostPickupPointsSync"><i class="fa fa-refresh"></i> {{ text_synchronize }}</button>
                                    <hr>
                                </div>
                            </div>
                            <h3 class="text-center {% if shipping_inpost_shipping_settings['pickupPoints'] %} hidden {% endif %}">No picking points added.</h3>
                            {% if shipping_inpost_shipping_settings['pickupPoints'] %}
                                {{ shipping_inpost_shipping_settings['pickupPoints']|raw }}
                            {% endif %}
                            <div class="row">
                                <div class="col-sm-12 text-right">
                                    <hr>
                                    <button type="button" class="btn btn-primary" id="button-new-pickup-point" data-toggle="modal" data-target="#inpostPickupPointModal"><i class="fa fa-plus-circle"></i></button>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="tab-orders">
                            <div class="form-group">
                                <label class="col-sm-6 control-label" for="input-shipping-email-confirmation">{{ entry_shipping_email_confirmation }}</label>
                                <div class="col-sm-6">
                                    <input type="checkbox" name="shipping_inpost_shipping_settings[email_confirmation]" value="1" {{ shipping_inpost_shipping_settings['email_confirmation'] ? 'checked="checked"' }} id="input-shipping-email-confirmation" class="js-switch" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-6 control-label" for="input-shipping-order-status-update-onlabel">{{ entry_shipping_order_status_update_onlabel }}</label>
                                <div class="col-sm-6">
                                    <input type="checkbox" name="shipping_inpost_shipping_settings[order_status_update_onlabel]" value="1" {{ shipping_inpost_shipping_settings['order_status_update_onlabel'] ? 'checked="checked"' }} id="input-shipping-order-status-update-onlabel" class="js-switch" />
                                    <div class="order-status-onlabel" {% if not shipping_inpost_shipping_settings.order_status_update_onlabel %} style="display:none;" {% endif %}>
                                        <br>
                                        <select name="shipping_inpost_shipping_settings[order_status_update_onlabel_value]" id="input-shipping-order-status-update-onlabel-value" class="form-control">
                                            {% for status in order_statuses %}
                                                <option value="{{ status.order_status_id }}" {% if status.order_status_id == shipping_inpost_shipping_settings.order_status_update_onlabel_value %} selected="selected" {% endif %}>{{ status.name }}</option>
                                            {% endfor %}
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-6 control-label" for="input-shipping-order-status-update-ondelivery">{{ entry_shipping_order_status_update_ondelivery }}</label>
                                <div class="col-sm-6">
                                    <input type="checkbox" name="shipping_inpost_shipping_settings[order_status_update_ondelivery]" value="1" {{ shipping_inpost_shipping_settings['order_status_update_ondelivery'] ? 'checked="checked"' }} id="input-shipping-order-status-update-ondelivery" class="js-switch" />
                                    <div class="order-status-ondelivery" {% if not shipping_inpost_shipping_settings.order_status_update_ondelivery %} style="display: none;" {% endif %}>
                                        <br>
                                        <select name="shipping_inpost_shipping_settings[order_status_update_ondelivery_value]" id="input-shipping-order-status-update-ondelivery-value" class="form-control">
                                            {% for status in order_statuses %}
                                                <option value="{{ status.order_status_id }}" {% if status.order_status_id == shipping_inpost_shipping_settings.order_status_update_ondelivery_value %} selected="selected" {% endif %}>{{ status.name }}</option>
                                            {% endfor %}
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-12">{{ entry_customer_account_show_return_statuses }}</label>
                                <input type="hidden" name="shipping_inpost_shipping_settings[return_statuses][]" value="[]" />
                                {% for status in order_statuses %}
                                    <div class="col-sm-3">
                                        <div class="checkbox">
                                            <label>
                                                <input type="checkbox" name="shipping_inpost_shipping_settings[return_statuses][]" value="{{ status.order_status_id }}" {% if status.order_status_id in shipping_inpost_shipping_settings['return_statuses'] %} checked="checked" {% endif %} />
                                                {{ status.name }}
                                            </label>
                                        </div>
                                    </div>
                                {% endfor %}
                            </div>
                        </div>
                        <div class="tab-pane" id="tab-quick-returns">
                            <div class="well">
                                <p>{{ text_signup_information_placeholder }}</p>
                                <p><a href="https://szybkiezwroty.pl/pl/business#navigate-buttons" target="_blank">{{ text_click_here }}</a></p>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-quick-returns">{{ entry_store_name }}</label>
                                <div class="col-sm-10">
                                    <input type="text" name="shipping_inpost_shipping_settings[quick_returns]" value="{{ shipping_inpost_shipping_settings['quick_returns'] }}" placeholder="{{ entry_store_name }}" id="input-quick-returns" class="form-control" />
                                    <br>
                                    <p><a href="https://szybkiezwroty.pl/{{ shipping_inpost_shipping_settings['quick_returns'] }}#navigate-buttons" id="link-quick-returns" target="_blank">{{ text_check_link }}</a></p>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="tab-support">
                            <div class="row">
                                <div class="col-sm-8 col-sm-offset-2 text-center">
                                    <h4>W przypadku pytań zapraszamy do skorzystania z formularza kontaktowego Działu Integracji firmy InPost, który dostępny jest tu:</h4>
                                    <b><a class="btn btn-lg btn-info" href="https://dokumentacja-inpost.atlassian.net/wiki/spaces/PL/pages/64192513/OpenCart" target="_blank">Dokumentacja</a></b>
                                    <p></p>
                                    <h4>Po wejściu w formularz wystarczy z listy wybrać opcję <b>"Wsparcie Klienta"</b>, w kategorii wybrać: <b>Moduł InPost</b>, a w polu <b>"Proszę podać nazwę modułu"</b> podajemy: <b>OpenCart</b></h4>
                                    <b><a class="btn btn-lg btn-info" href="https://inpost.pl/formularz-wsparcie" target="_blank">Wsparcie Klienta</a></b>
                                </div>
{#                                <div class="col-sm-4 text-center">#}
{#                                    <h4>Dostępność Infolinii</h4>#}
{#                                    <p>poniedziałek – piątek 7:00–22:00</p>#}
{#                                    <p>sobotę 8:00–20:00</p>#}
{#                                    <p>niedziele 8:00 - 18:00</p>#}
{#                                    <p>Święta 8:00 - 16:00</p>#}
{#                                </div>#}
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <input type="hidden" id="input-user-token" value="{{ user_token }}" />
    <input type="hidden" id="input-shipping-methods" value='{{ apiShippingMethodsJson }}' />
    <input type="hidden" id="input-delivery-services" value='{{ apiDeliveryServicesJson }}' />
</div>
<script>
    $(document).ready(function(){
       $('.time').datetimepicker({
           pickDate: false
       })
    });
</script>

{% if shipping_inpost_shipping_geowidget_api_key or shipping_inpost_shipping_geowidget_sandbox_api_key %}
    {% set geoWidgetToken = shipping_inpost_shipping_sandbox_mode ? shipping_inpost_shipping_geowidget_sandbox_api_key : shipping_inpost_shipping_geowidget_api_key %}
<div class="modal fade" id="inpostGeoWidgetModal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg" role="document" style="height: 90%">
        <div class="modal-content" style="height: 100%">
            <div class="modal-body" style="height: 100%">
                <inpost-geowidget id="geoWidget" onpoint="afterPointSelected" token="{{ geoWidgetToken }}" language="en" config="parcelCollect"></inpost-geowidget>
            </div>
        </div>
    </div>
</div>
{% endif %}

<link rel="stylesheet" href="{{ geoWidgetAssets.style }}" />
<script src="{{ geoWidgetAssets.script }}" defer></script>
{{ footer }}