Mark valid usecases for alert
This commit is contained in:
parent
361dcbb1df
commit
c855d86bf8
3 changed files with 3 additions and 0 deletions
|
@ -2,6 +2,7 @@ $(document).ready(function () {
|
|||
const id = $("#id-embed");
|
||||
|
||||
if (id.data("configured") === false) {
|
||||
// eslint-disable-next-line no-alert
|
||||
alert(I18n.t("site.edit.id_not_configured"));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -255,6 +255,7 @@ $(document).ready(function () {
|
|||
fetch(url, { mode: "no-cors", signal: AbortSignal.timeout(5000) })
|
||||
.then(callback)
|
||||
.catch(function () {
|
||||
// eslint-disable-next-line no-alert
|
||||
alert(I18n.t("site.index.remote_failed"));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -108,6 +108,7 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch
|
|||
delete endpoint.geocodeRequest;
|
||||
if (json.length === 0) {
|
||||
input.addClass("is-invalid");
|
||||
// eslint-disable-next-line no-alert
|
||||
alert(I18n.t("javascripts.directions.errors.no_place", { place: endpoint.value }));
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue