From 64d26557a090b4f5bccb2d0d15c03e148f04f454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Fri, 6 Mar 2020 14:22:03 +0100 Subject: neki i18n js --- js/login.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'js/login.js') diff --git a/js/login.js b/js/login.js index aba0fa3..d7c9579 100644 --- a/js/login.js +++ b/js/login.js @@ -1,6 +1,4 @@ const API_ENDPOINT = "https://gimb.tk/test.php"; -// const API_ENDPOINT = "http://localhost:5000/test.php"; - document.addEventListener("DOMContentLoaded", () => { setupEventListeners(); }) @@ -46,7 +44,7 @@ function login() { // If ime is null, the password was incorrect if (data["ime"] === null) { - M.toast({ html: "Login failed!" }); + UIAlert( S("loginFailed"), "login(): fetchprofil null name; bad login info." ); $("#password").val(""); } else { @@ -63,7 +61,7 @@ function login() { }, error: function () { - M.toast({ html: "No internet connection!" }); + UIAlert( S("noInternetConnection"), "login(): $.ajax error" ); } }) -- cgit v1.2.3