Подскажите пожалуйста что здесь удалить
{{ header }}
<div id="information-contact" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<h1 class="m-t-0 m-b-3 h3 custom-title">{{ heading_title }}</h1>
{{ content_top }}
<div id="content">
{% if geocode and map_status %}
<div>
<div id="map" style=" height: 245px;"></div>
</div>
{% endif %}
<div class="content-default flexbox-xs-out m-b-3-xs-out btn-block-xs">
{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-xs-12 col-sm-12' %}
{% endif %}
<div class="{{ class }}">
<div class="row">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d349.57138396005075!2d30.522173976583332!3d50.45419637160626!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0xd26969a28559f84b!2zQWxpU2hvcCAtIFZhcGUgU2hvcCAo0LzQsNCz0LDQt9C40L0g0Y3Qu9C10LrRgtGA0L7QvdC90YvRhSDRgdC40LPQsNGA0LXRgik!5e0!3m2!1sru!2sua!4v1544439555680" width="100%" height="270" frameborder="0" style="border:0" allowfullscreen></iframe>
<div class="content-default flexbox-xs-out">
<div class="block-center btn-block f-w-5 text">
<div class="row">
<div class="col-sm-3 p-t-3">
<div class="icon-contact"><i class="icon icon-info-point"></i></div>
<div class="m-b-3 p-b-3">
<div class="box-title f-s-5">{{ text_location }}:</div>
<div class="m-t f-s-3 m-b">
<span>{{ address }}</span>
</div>
{% if geocode and map_status %}
<i class="fa fa-map-marker marker-map"></i><a class="cursor-p f-s-3" onclick="getPoint('0')">{{ button_map }}</a>
{% endif %}
</div>
</div>
<div class="col-sm-3 p-t-3">
<div class="icon-contact"><i class="icon icon-info-telephone"></i></div>
<div class="m-b-3 p-b-3">
<div class="box-title f-s-5">{{ text_telephone }}:</div>
<div class="m-t f-s-3">
<div><a href="tel:{{ telephone|replace({' ': ''}) }}" title="{{ telephone }}" class="text-base"><strong>{{ telephone }}</strong></a></div>
<div> <a class="text-base" title="+38(068)118-17-15" href="tel:+38 (068) 118-17-15"><strong> +38 (068) 118-17-15</strong></a></div>
</div>
{% if fax %}
<div class="box-title f-s-5 m-t-2">{{ text_fax }}:</div>
<div class="m-t f-s-3">
<span>{{ fax }}</span>
</div>
{% endif %}
</div>
</div>
<div class="col-sm-3 p-t-3">
<div class="icon-contact"><i class="icon icon-info-mail"></i></div>
<div class="m-b-3 p-b-3">
<div class="box-title f-s-5">{{ text_email }}:</div>
<div class="m-t f-s-3">
<a style="text-decoration: underline;" href="mailto:{{ email_store|replace({' ': ''}) }}">{{ email_store }}</a>
</div>
</div>
</div>
<div class="col-sm-3 p-t-3">
<div class="icon-contact"><i class="icon icon-info-clock-white"></i></div>
<div class="m-b-3 p-b-3">
<div class="box-title f-s-5">{{ text_open }}:</div>
<div class="m-t f-s-3">
<span>{{ open }}</span>
</div>
{% if comment %}
<div class="box-title f-s-5 m-t-2">{{ text_comment }}:</div>
<div class="m-t f-s-3">
<span>{{ comment }}</span>
</div>
{% endif %}
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-6 m-t-2">
<h3 class="m-b-3 h4">{{ text_contact }}</h3>
<form id="form-contact" method="post" enctype="multipart/form-data">
<div class="row">
<div class="col-xs-12 col-sm-6 m-b">
<div class="form-group required">
<label class="control-label" for="input-name">{{ entry_name }}</label>
<input type="text" name="name" id="input-name" class="form-control" />
<div id="error-name-contact-form" style="display:none"></div>
</div>
</div>
<div class="col-xs-12 col-sm-6 m-b">
<div class="form-group required">
<label class=" control-label" for="input-email">{{ entry_email }}</label>
<input type="text" name="email" id="input-email" class="form-control" />
<div id="error-email-contact-form" style="display:none">
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 m-b">
<div class="form-group required">
<label class=" control-label" for="input-subject">{{ entry_subject }}</label>
<input type="text" name="subject" value="" id="input-subject" class="form-control" />
<div id="error-subject-contact-form" style="display:none"></div>
</div>
</div>
</div>
<div class="form-group m-b-2 required">
<label class="control-label" for="input-enquiry">{{ entry_enquiry }}</label>
<textarea name="enquiry" rows="5" id="input-enquiry" class="form-control"></textarea>
<div id="error-enquiry-contact-form" style="display:none"></div>
</div>
<div class="clearfix">
<div class="pull-left">
{{ captcha }}
</div>
</div>
<div class="buttons">
<div class="pull-left btn-block-xs">
<button class="btn btn-primary btn-lg btn-block-xs" id="button-send">{{ button_submit }}</button>
</div>
</div>
</form>
</div>
{% if locations %}
<div class="col-sm-6 m-t-2">
<h3 class="m-b h4">{{ text_store }}</h3>
<div class="panel-group" id="accordion">
{% for location in locations %}
<div class="panel p-t p-b">
<div>
<h4><a href="#collapse-location{{ location.location_id }}" class="accordion-toggle text-base" data-toggle="collapse" data-parent="#accordion">{{ location.name }} <i class="fa fa-caret-down"></i></a></h4>
</div>
<div class="panel-collapse collapse" id="collapse-location{{ location.location_id }}">
<div class="p-t p-b">
<div class="row">
{% if location.image %}
<div class="col-sm-2"><img src="{{ location.image }}" alt="{{ location.name }}" title="{{ location.name }}" class="img-thumbnail" /></div>
{% endif %}
<div class="col-sm-4">
<strong>{{ location.name }}</strong><br />
<address>
{{ location.address }}
</address>
{% if location.geocode and map_status %}
<i class="fa fa-map-marker marker-map"></i><a class="cursor-p" onclick="getPoint('{{ location.location_id }}')">{{ button_map }}</a>
{% endif %}
</div>
<div class="col-sm-3"> <strong>{{ text_telephone }}</strong><br>
{{ location.telephone }}<br />
<br />
{% if location.fax %}
<strong>{{ text_fax }}</strong><br>
{{ location.fax }}
{% endif %}
</div>
<div class="col-sm-3">
{% if location.open %}
<strong>{{ text_open }}</strong><br />
{{ location.open }}<br />
<br />
{% endif %}
{% if location.comment %}
<strong>{{ text_comment }}</strong><br />
{{ location.comment }}
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{{ column_right }}
</div>
{{ content_bottom }}
</div>
</div>
<script>
function getPoint(mobject) {
locationsMap.setCenter(objectManager.objects.getById(mobject).geometry.coordinates, 15, {
});
fullscreenControl.enterFullscreen();
objectManager.objects.balloon.open(mobject);
return false;
};
</script>
{% if geocode and map_status %}
<script type="text/javascript"><!--
$('#button-send').on('click', function() {
$.ajax({
url: 'index.php?route=information/contact/send',
type: 'post',
dataType: 'json',
data: $("#form-contact").serialize(),
beforeSend: function() {
$('#button-send').button('loading');
},
complete: function() {
$('#button-send').button('reset');
},
success: function(json) {
ClearError();
if (json['error']) {
if (json['warning_notification']) {
ErrorAlertFixed(json['warning_notification']);
}
$.each(json['error'], function(i, item) {
var input = $('#form-contact #error-' + i + '-contact-form');
ErrorAlert(input, item)
});
if (json['error']['captcha']) {
ErrorCaptcha($('#form-contact .error-captcha'), json['error']['captcha'])
}
}
if (json['success']) {
$('#form-contact').html('<div class="alert alert-success m-b-0"><div><i class="fa fa-check-circle f-s-5 m-r"></i><span class="success f-s-3 f-w-5">' + json['success']['message'] + '</span></div></div>');
$('input[name=\'name\']').val('');
$('input[name=\'email\']').val('');
$('input[name=\'subject\']').val('');
$('textarea[name=\'enquiry\']').val('');
}
}
});
return false;
});
var locationsMap = false;
function mapinit() {
locationsMap = new ymaps.Map('map', {
center: [{{ geocode }}],
zoom: 13,
controls: ['geolocationControl']
}, {
searchControlProvider: 'yandex#search'
}),
// Создание макета балуна на основе Twitter Bootstrap.
MyBalloonLayout = ymaps.templateLayoutFactory.createClass(
'<div class="popover top">' +
'<a class="close" href="#">×</a>' +
'<div class="arrow"></div>' +
'<div class="popover-inner">' +
'$[[options.contentLayout observeSize minWidth=200 maxWidth=650 maxHeight=350]]' +
'</div>' +
'</div>', {
/**
* Строит экземпляр макета на основе шаблона и добавляет его в родительский HTML-элемент.
* @see https://api.yandex.ru/maps/doc/jsapi/2.1/ref/reference/layout.templateBased.Base.xml#build
* @function
* @name build
*/
build: function () {
this.constructor.superclass.build.call(this);
this._$element = $('.popover', this.getParentElement());
this.applyElementOffset();
this._$element.find('.close')
.on('click', $.proxy(this.onCloseClick, this));
},
/**
* Удаляет содержимое макета из DOM.
* @see https://api.yandex.ru/maps/doc/jsapi/2.1/ref/reference/layout.templateBased.Base.xml#clear
* @function
* @name clear
*/
clear: function () {
this._$element.find('.close')
.off('click');
this.constructor.superclass.clear.call(this);
},
/**
* Метод будет вызван системой шаблонов АПИ при изменении размеров вложенного макета.
* @see https://api.yandex.ru/maps/doc/jsapi/2.1/ref/reference/IBalloonLayout.xml#event-userclose
* @function
* @name onSublayoutSizeChange
*/
onSublayoutSizeChange: function () {
MyBalloonLayout.superclass.onSublayoutSizeChange.apply(this, arguments);
if(!this._isElement(this._$element)) {
return;
}
this.applyElementOffset();
this.events.fire('shapechange');
},
/**
* Сдвигаем балун, чтобы "хвостик" указывал на точку привязки.
* @see https://api.yandex.ru/maps/doc/jsapi/2.1/ref/reference/IBalloonLayout.xml#event-userclose
* @function
* @name applyElementOffset
*/
applyElementOffset: function () {
this._$element.css({
left: -(this._$element[0].offsetWidth / 2),
top: -(this._$element[0].offsetHeight + this._$element.find('.arrow')[0].offsetHeight)
});
},
/**
* Закрывает балун при клике на крестик, кидая событие "userclose" на макете.
* @see https://api.yandex.ru/maps/doc/jsapi/2.1/ref/reference/IBalloonLayout.xml#event-userclose
* @function
* @name onCloseClick
*/
onCloseClick: function (e) {
e.preventDefault();
this.events.fire('userclose');
},
/**
* Используется для автопозиционирования (balloonAutoPan).
* @see https://api.yandex.ru/maps/doc/jsapi/2.1/ref/reference/ILayout.xml#getClientBounds
* @function
* @name getClientBounds
* @returns {Number[][]} Координаты левого верхнего и правого нижнего углов шаблона относительно точки привязки.
*/
getShape: function () {
if(!this._isElement(this._$element)) {
return MyBalloonLayout.superclass.getShape.call(this);
}
var position = this._$element.position();
return new ymaps.shape.Rectangle(new ymaps.geometry.pixel.Rectangle([
[position.left, position.top], [
position.left + this._$element[0].offsetWidth,
position.top + this._$element[0].offsetHeight + this._$element.find('.arrow')[0].offsetHeight
]
]));
},
/**
* Проверяем наличие элемента (в ИЕ и Опере его еще может не быть).
* @function
* @private
* @name _isElement
* @param {jQuery} [element] Элемент.
* @returns {Boolean} Флаг наличия.
*/
_isElement: function (element) {
return element && element[0] && element.find('.arrow')[0];
}
}),
// Создание вложенного макета содержимого балуна.
MyBalloonContentLayout = ymaps.templateLayoutFactory.createClass(
'<h3 class="popover-title">$[properties.balloonContentHeader]</h3>' +
'<div class="popover-content border-0">$[properties.balloonContent]</div>'
),
objectManager = new ymaps.ObjectManager({
clusterize: true,
gridSize: 68
});
fullscreenControl = new ymaps.control.FullscreenControl();
locationsMap.controls.add(fullscreenControl);
objectManager.clusters.options.set({
preset: 'islands#ClusterIcons',
clusterIconColor: '#fd3c44'
});
locationsMap.geoObjects.add(objectManager);
$.ajax({
url: "index.php?route=information/contact/getMapsData",
type: "post",
dataType: "json",
}).done(function(data) {
objectManager.add(data);
objectManager.objects.options.set({
balloonShadow: false,
balloonLayout: MyBalloonLayout,
balloonContentLayout: MyBalloonContentLayout,
});
{% if locations %}
locationsMap.setBounds(objectManager.getBounds(), {
checkZoomRange: true,
zoomMargin: 50
});
{% endif %}
});
}
ymaps.ready(mapinit);
$(window).resize(function() {
if (locationsMap) {
locationsMap.container.fitToViewport();
}
});
//-->
</script>
{% endif %}
{{ footer }}