Tweak highlighting of geolocation errors

This commit is contained in:
Tom Hughes 2018-04-02 15:24:03 +01:00
parent 87dfbda932
commit 7e6e1dfbaf
2 changed files with 4 additions and 4 deletions

View file

@ -54,7 +54,7 @@ OSM.Directions = function (map) {
});
input.on("keydown", function() {
input.removeClass("highlight_error");
input.removeClass("error");
});
input.on("change", function (e) {
@ -90,8 +90,8 @@ OSM.Directions = function (map) {
endpoint.awaitingGeocode = false;
endpoint.hasGeocode = true;
if (json.length === 0) {
input.addClass("error");
alert(I18n.t('javascripts.directions.errors.no_place', {place: endpoint.value}));
input.addClass("highlight_error");
return;
}