jQuery(function ($) { var llbl = $(‘#loginform-submit’).html(); $(‘#loginform’).submit(function () { $(‘#loginform-submit’).html(WPDM.html(“i”, “”, “fa fa-spin fa-sync”)+” Logging In…”).attr(‘disabled’, ‘disabled’); WPDM.blockUI(‘#loginform’); $(this).ajaxSubmit({ error: function(error) { WPDM.unblockUI(‘#loginform’); $(‘#loginform’).prepend(WPDM.html(“div”, error.responseJSON.messages, “alert alert-danger”)); $(‘#loginform-submit’).html(llbl).removeAttr(‘disabled’); }, success: async function (res) { WPDM.unblockUI(‘#loginform’); if (!res.success) { $(‘form .alert-danger’).hide(); $(‘#loginform’).prepend(WPDM.html(“div”, res.message, “alert alert-danger”)); $(‘#loginform-submit’).html(llbl).removeAttr(‘disabled’); } else { await WPDM.doAction(“wpdm_user_login”); $(‘#loginform-submit’).html(WPDM.html(“i”, “”, “fa fa-sun fa-spider”) + ” ” + res.message); setTimeout(function () { location.href = “/vb-team-file-login/”; }, 1000); } } }); return false; }); $(‘body’).on(‘click’, ‘form .alert-danger’, function(){ $(this).slideUp(); }); });