function sendAjax(form)
{
    blockui();
    let formData = new FormData(form);
    $.ajax({
        url: "/login",
        type: "POST",
        data: formData,
        processData: false,
        contentType: false,
        success: function(response) {
            ublockui();
            if(response.status == "success")
            {
                window.location = "/login";
            }else{
                $("#validationError").text(response.message);
            }
        },
        error: function(err) {
            ublockui();
            $("#validationError").text(err.responseJSON.message);
        },
    });
    return false;
}
function blockui()
{
    $('.login-form-container').block({
        message: '<div class="loader-container-box"><div class="loader"></div></div>',
        //timeout: 13000,
        overlayCSS: {
            backgroundColor: 'rgba(var(--dark), 0.8)',
            opacity: 0.8,
            borderRadius: 'var(--app-border-radius)',
            cursor: 'wait'
        },
        css: {
            border: 0,
            padding: 0,
            backgroundColor: 'transparent'
        }
    });
}
function ublockui()
{
    $('.login-form-container').unblock()
}