Merge remote-tracking branch 'upstream/pull/1800'

This commit is contained in:
Tom Hughes 2018-04-02 15:18:11 +01:00
commit 87dfbda932
3 changed files with 11 additions and 2 deletions

View file

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

View file

@ -938,6 +938,10 @@ header .search_forms,
border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0;
} }
input.highlight_error {
background-color: rgba(255, 0, 0, 0.5);
}
select { select {
/* this next line is to polyfill the vertical alignment of text within a select element, /* this next line is to polyfill the vertical alignment of text within a select element,
* which is different between firefox and chrome. */ * which is different between firefox and chrome. */

View file

@ -2325,7 +2325,7 @@ en:
distance: "Distance" distance: "Distance"
errors: errors:
no_route: "Couldn't find a route between those two places." no_route: "Couldn't find a route between those two places."
no_place: "Sorry - couldn't find that place." no_place: "Sorry - couldn't locate '%{place}'."
instructions: instructions:
continue_without_exit: Continue on %{name} continue_without_exit: Continue on %{name}
slight_right_without_exit: Slight right onto %{name} slight_right_without_exit: Slight right onto %{name}