Forum Replies Created
Viewing 1 post (of 1 total)
-
Author
-
jmotParticipant
Found the issue. In app.js (line 1237) the kleoAjaxLogin function is calling $(‘#login_form’).submit() on error. It gets stuck in a loop and never replaces the html of #kleo-login-result.
COPY CODEkleoAjaxLogin: function () { $('form#login_form').on('submit', function (e) { $('#kleo-login-result').show().html(kleoFramework.loadingmessage); $.ajax({ type: 'POST', dataType: 'json', url: kleoFramework.loginUrl, data: { action: 'kleoajaxlogin', log: $('form#login_form #username').val(), pwd: $('form#login_form #password').val(), remember: ($('form#login_form #rememberme').is(':checked') ? true : false), security: $('form#login_form #security').val() }, success: function (data) { console.log(data); $('#kleo-login-result').html(data.message); if (data.loggedin == true) { if (data.redirecturl == null) { document.location.reload(); } else { document.location.href = data.redirecturl; } } }, complete: function () { }, error: function (err) { // Added this. It wasn't displaying the error message. $('#kleo-login-result').html(err.responseJSON.message); $('form#login_form', '#login_panel').off('submit'); // I commmented this out. Why is this in here? // $("#login_form").submit(); } }); e.preventDefault(); }); }
-
AuthorPosts
Viewing 1 post (of 1 total)