diff --git a/assets/css/pretendo-auth.css b/assets/css/pretendo-auth.css index 1eb5953..0c31312 100644 --- a/assets/css/pretendo-auth.css +++ b/assets/css/pretendo-auth.css @@ -42,4 +42,14 @@ body footer .content { .card .content .lowText { text-align: right; color: #707070; +} + +.error { + background-color: #eea9a9; + border-left: 3px solid #d83434; + padding: 1em; + color: rgba(0, 0, 0, 0.7); +} +.error.hide { + display: none; } \ No newline at end of file diff --git a/assets/js/auth.js b/assets/js/auth.js index 88aa60d..4badf65 100644 --- a/assets/js/auth.js +++ b/assets/js/auth.js @@ -12,7 +12,9 @@ function postAjax(url, data, success) { } function showErrorPopup(errorText) { - console.log(errorText) + console.log(errorText); + document.getElementById('errorBox').innerHTML = errorText; + document.getElementById('errorBox').classList.remove('hide'); } function login() { diff --git a/views/login.hbs b/views/login.hbs index 21b6c76..ac270cf 100644 --- a/views/login.hbs +++ b/views/login.hbs @@ -12,6 +12,7 @@

ERROR

{{ locale.login.card.title }}

+
diff --git a/views/register.hbs b/views/register.hbs index 20efab8..a42add7 100644 --- a/views/register.hbs +++ b/views/register.hbs @@ -14,6 +14,7 @@

{{ locale.register.card.caption }}

{{ locale.register.card.title }}

+