A Pen by Roman Zykov on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function mailSend($to, &$errors) { | |
if (!$to) { | |
$app_settings_model = new waAppSettingsModel(); | |
$to = $app_settings_model->get('webasyst', 'email'); | |
} | |
if (!$to) { | |
$errors['all'] = _ws('Recipient (administrator) email is not valid'); | |
return false; | |
} | |
$email = waRequest::post('email'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#yandex-location').autocomplete({ | |
delay: 300, | |
source: function(request, responce) { | |
$.get('https://geocode-maps.yandex.ru/1.x/', { | |
geocode: request.term, | |
sizes: 5, | |
format: 'json' | |
}, function(data) { | |
var result = []; | |
data.response.GeoObjectCollection.featureMember.forEach(function(el, i) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function init(){ | |
ymaps.geolocation.get({ | |
// Зададим способ определения геолокации | |
// на основе ip пользователя. | |
provider: 'yandex', | |
// Включим автоматическое геокодирование результата. | |
autoReverseGeocode: true | |
}).then(function (result) { | |
// Выведем результат геокодирования. | |
console.log('--> Выведем результат геокодирования'); |