Use .is-invalid to highlight routing inputs with failed geocode lookups
This commit is contained in:
parent
280917c756
commit
6c3c4f2751
1 changed files with 3 additions and 3 deletions
|
@ -70,7 +70,7 @@ OSM.Directions = function (map) {
|
|||
});
|
||||
|
||||
input.on("keydown", function () {
|
||||
input.removeClass("error");
|
||||
input.removeClass("is-invalid");
|
||||
});
|
||||
|
||||
input.on("change", function (e) {
|
||||
|
@ -84,7 +84,7 @@ OSM.Directions = function (map) {
|
|||
endpoint.setValue = function (value, latlng) {
|
||||
endpoint.value = value;
|
||||
delete endpoint.latlng;
|
||||
input.removeClass("error");
|
||||
input.removeClass("is-invalid");
|
||||
input.val(value);
|
||||
|
||||
if (latlng) {
|
||||
|
@ -109,7 +109,7 @@ OSM.Directions = function (map) {
|
|||
endpoint.awaitingGeocode = false;
|
||||
endpoint.hasGeocode = true;
|
||||
if (json.length === 0) {
|
||||
input.addClass("error");
|
||||
input.addClass("is-invalid");
|
||||
alert(I18n.t("javascripts.directions.errors.no_place", { place: endpoint.value }));
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue