https://acumatica.superiorlubricants.com/Frames/Login.aspx?ReturnUrl=%2f

ID de l'analyse :
dcb5e693-adeb-4b04-a20c-cfe1912e2ad7Terminée
URL soumise :
https://acumatica.superiorlubricants.com/Redirigé
Fin du rapport :

Liens : 1 trouvé(s)

Liens sortants identifiés à partir de la page

Lientexte
http://www.acumatica.com

Variables JavaScript : 42 trouvée(s)

Les variables JavaScript globales chargées dans l'objet fenêtre d'une page sont des variables déclarées en dehors des fonctions et accessibles depuis n'importe quel endroit du code au sein du champ d'application actuel

NomType
onbeforetoggleobject
documentPictureInPictureobject
onscrollendobject
adialogobject
initLoginImagefunction
resizeLoginImagefunction
theFormobject
__doPostBackfunction
$function
jQueryfunction

Messages de journal de console : 1 trouvé(s)

Messages consignés dans la console web

TypeCatégorieEnregistrement
errornetwork
URL
https://acumatica.superiorlubricants.com/favicon.ico
texte
Failed to load resource: the server responded with a status of 404 ()

HTML

Le corps HTML de la page en données brutes

<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><link href="../App_Themes/Default/00_Controls.css?timestamp=638491588560000000" type="text/css" rel="stylesheet"><link href="../Content/font-awesome.css?timestamp=638490939700000000" type="text/css" rel="stylesheet"><title>
	Acumatica - Login
</title><meta name="viewport" content="width=device-width, initial-scale=1">
	<style type="text/css">
		select:focus, input[type="text"]:focus, input[type="password"]:focus
		{
			border-radius: 8px;
			border-width: 2px;
			border-color: #027acc;
		}
		input[type="text"][readonly]:focus {
			border: solid 1px RGBA(0, 0, 0, 0.12);
		}
		select::-ms-expand 
		{ 
			display: none;
		}
		select
		{
			-webkit-appearance: none;
			-moz-appearance: none;
			appearance: none;
			background: url("../icons/arrow.png") 96% / 9px no-repeat #fff;
		}
		select.login_lang
		{
			background: url("../icons/arrow.png") 94% / 9px no-repeat #fff;
		}
		span.error
		{
			color: red;
		}

		#login_customization {
		width: 100%;
		z-index: 1000;
		height: 100%;
		display: none;
		background: #0000003d;
		position: fixed;
		top: 0;
		left: 0;
		justify-content: center;
		align-items: center;
		}

		.customization-dlg {
		width: 460px;
		height: auto;
		background: white;
		border-radius: 10px;
		padding: 20px;
		}

		.customization-dlg-top {
		display: flex;
		flex-direction: row;
		height: 30px;
		align-items: center;
		}
		
		.customization-dlg-top-title {
		width: 100%;
		font-weight: normal;
		}

		.customization-dlg-top-title>span {
		font-size: 18px;
		color: black;
		font-weight: normal;
		}

		.customization-dlg-top-close {
		cursor: pointer;
		text-align: center;
		font-size: 25px;
		}

		.customization-dlg-top-close:hover {
		font-weight: bold;
		}

		.customization-dlg-body {
		overflow-y: auto;
		max-height: 300px;
		}

		.customization-dlg-body>span>ul {
		padding-inline-start: 20px;
		color: black;
		margin-top: 8px;
		padding-left: 17px;
		line-height: 20px;
		margin-bottom: 0;
		padding-bottom: 0;
		}

		.customization-dlg-body>span>ul>li {
		text-indent: -4px;
		}
	</style>
	<script type="text/javascript">
        (function (root, factory) {
            'use strict';
            window.adialog = factory(root.jQuery);
        }(this, function init($, undefined) {
            var exports = {};

            var templates = {
                contStyle: " \
            display: flex; \
            font: 13px Arial; \
            position: fixed; \
            align-items: center; \
            justify-content: center; \
            z-index: 1; \
            left: 0; \
            top: 0; \
            width: 100%; \
            height: 100%; \
            overflow: auto; \
            background-color: rgba(0,0,0,0.15);",

                boxStyle: ".dialog-lib-boxStyle { \
            background-color: transparent; \
            margin: auto; \
            border: 0px solid #888; \
            min-width: 300px; \
            max-width: 800px; \
            min-height: 100px; \
            display: flex; \
            position: absolute; \
            flex-direction: column; \
            justify-content: space-between; \
            border-radius: 10px; \
            box-shadow: 1px 1px 4px 2px silver; \
            animation: traffic .2s forwards; \
        }",

                titleStyle: ".dialog-lib-titleStyle { \
            padding: 20px 20px 0px 20px; \
            font-weight: bold; \
            font-size: 15px; \
        }",
                bodyStyle: ".dialog-lib-bodyStyle { \
            padding: 20px 20px 10px 20px; \
        }",
                buttonsStyle: ".dialog-lib-buttonsStyle { \
            justify-content: flex-end; \
            padding: 20px 20px 20px 20px; \
            display: flex; \
            gap: 10px; \
        }",
                btnStyle: ".dialog-lib-btnStyle { \
            color: white; \
            background-color: #027acc; \
            border: solid 1px #027acc; \
            border-radius:8px; cursor: pointer; min-width: 80px; \
            height: 40px; \
            font-size: 15px; \
            font-weight: 400; \
        } \
        .dialog-lib-btnStyle:hover { \
            background-color: #3399cc; \
        } \
        "
            }

            exports.dialog = function (p) {
                if (!p) return;

                var boxEl, titleEl, bodyEl, buttonsEl;

                const contEl = document.createElement("DIV");

                if (p.style && p.style.container) contEl.setAttribute("style", p.style.container);
                else contEl.setAttribute("style", templates.contStyle);

                const styleEl = document.createElement("STYLE");
                styleEl.innerText = "@keyframes traffic { \
            100%{background: #fefefe; } \
           }"+ templates.boxStyle + templates.bodyStyle + templates.titleStyle + templates.buttonsStyle + templates.btnStyle;
                contEl.appendChild(styleEl);

                boxEl = document.createElement("DIV");

                if (p.style && p.style.box) boxEl.setAttribute("style", p.style.box);
                boxEl.classList.add("dialog-lib-boxStyle");

                contEl.appendChild(boxEl);

                if (p.title) {
                    titleEl = document.createElement("DIV");
                    if (p.style && p.style.title) titleEl.setAttribute("style", p.style.title);
                    titleEl.classList.add("dialog-lib-titleStyle");
                    titleEl.innerHTML = p.title;
                    boxEl.appendChild(titleEl);
                }

                if (p.body) {
                    bodyEl = document.createElement("DIV");
                    bodyEl.innerHTML = p.body;
                    if (p.style && p.style.body) bodyEl.setAttribute("style", p.style.body);
                    bodyEl.classList.add("dialog-lib-bodyStyle");
                    boxEl.appendChild(bodyEl);
                }

                if (p.buttons) {
                    buttonsEl = document.createElement("DIV");
                    if (p.buttons.style) buttonsEl.setAttribute("style", p.buttons.style);
                    buttonsEl.classList.add("dialog-lib-buttonsStyle");

                    if (p.buttons.elements) {
                        p.buttons.elements.forEach(function (el) {
                            const btn = document.createElement("BUTTON");
                            btn.classList.add("dialog-lib-btnStyle");
                            btn.style = el.style;
                            btn.innerHTML = el.text || "button";
                            if (el.click) btn.addEventListener("click", el.click);
                            btn.addEventListener("click", function () {
                                document.body.removeChild(contEl);
                            });
                            buttonsEl.appendChild(btn);
                        });
                    }
                    boxEl.appendChild(buttonsEl);
                }

                document.body.appendChild(contEl);
                return ({ boxEl, titleEl, bodyEl, buttonsEl });
            }
            return exports;
        }));
    </script>
	<script type="text/javascript">
		function initLoginImage()
		{
			var an = window.navigator.userAgent.toLowerCase();
			var isIPhone = an.indexOf("iphone") >= 0, isAndroid = an.indexOf("android") >= 0;
			var isWinPhone = an.indexOf("windows phone") >= 0 || an.indexOf("wpdesktop") >= 0;
			var outlook = document.getElementById("__isOutlook");
			if (((isIPhone || isAndroid || isWinPhone) && window.screen.availWidth < 800) || (outlook != null && outlook.value == "1"))
			{
				document.getElementById('login_copyright').style.display = 'block';
				if (outlook != null && outlook.value == "1")
				{
					var links = document.getElementById('login_links');
					links.style.display = "none";

					var btn_cancel = document.getElementById('btnCancel');
					if (btn_cancel)
						btn_cancel.style.display = "none";
				}

				var bg = document.getElementById('login_bg');
				var panel = document.getElementById('login_panel');
				panel.className = "mobile border-box";
				bg.style.display = "none";
				return;
			}

			var url = window.__loginBg;
			if (url)
			{
				var elem = document.getElementById('login_bg_image');
				var im = new Image(); im.src = url;
				var initImage = function ()
				{
					elem.originalWidth = im.naturalWidth ? im.naturalWidth : im.width;
					elem.originalHeight = im.naturalHeight ? im.naturalHeight : im.height;
					resizeLoginImage(); elem.style.display = ""; elem.src = url;
				}
				if (im.complete) initImage(); else im.onload = initImage;
			}
			else {
				document.getElementById('login_copyright').style.display = 'block';
			}
		}

		function resizeLoginImage()
		{
			var elem = document.getElementById('login_bg_image');
			var container = document.getElementById('login_bg'), panel = document.getElementById('login_panel');
			if (container.style.display == "")
			{
				var nw = elem.originalWidth, nh = elem.originalHeight;
				var pw = container.offsetWidth - panel.offsetWidth, ph = container.offsetHeight;

				var coeff = Math.max(Math.max(pw / nw, ph / nh), 0.5);
				elem.style.width = Math.ceil(coeff * nw) + "px";
				elem.style.height = Math.ceil(coeff * nh) + "px";
				panel.style.minHeight = elem.style.height;
				
				document.getElementById('login_copyright').style.display = 'block';
			}
		}
	</script>
	</head>
<body>
	<form name="form1" method="post" action="./Login.aspx?ReturnUrl=%2f" id="form1" autocomplete="off">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="">
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="">
<input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTY4OTIzNzg1Nw8WAh4TVmFsaWRhdGVSZXF1ZXN0TW9kZQIBZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUbY3RsMDAkcGhVc2VyJHJlbWVtYmVyRGV2aWNlX8IfQlp5ppC4ixHL1/YJKl8XEw0=">
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>



<script src="/Scripts/jquery-3.6.0.min.js" type="text/javascript"></script>
<script src="/Scripts/signalr.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var __loginBg = '/Icons/login_bg13.jpg';//]]>
</script>

<div>

	<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="7AFA5AE2">
</div>
		<div id="login_bg">
			<img id="login_bg_image" style="width: 900px; height: 600px;" src="/Icons/login_bg13.jpg">
			<input name="ctl00$txtLoginBgIndex" type="hidden" id="txtLoginBgIndex" value="login_bg13.jpg">
			<input name="ctl00$__isOutlook" type="hidden" id="__isOutlook">
		</div>
		<div id="login_panel" class="border-box" style="min-height: 600px;">
			<div id="login_data" style="padding-bottom: 124px;">
				<div id="login_logo">
					<a class="logo" id="panelT_logoCell" tabindex="-1" target="_blank" href="http://www.acumatica.com">
						<img src="../Icons/login_logo.png" class="login_img" alt="logo">
					</a>
					
	<select name="ctl00$phLogo$cmbLang" onchange="javascript:setTimeout('__doPostBack(\'ctl00$phLogo$cmbLang\',\'\')', 0)" id="cmbLang" class="login_lang" style="display:none;">
	<option selected="selected" value="en-US">English</option>

</select>

				</div>

				<div id="login_errBox">
					<span id="lblMsg" class="login_error"></span>
				</div>
				<div id="login_user">
					
	
	

	<input name="ctl00$phUser$txtSingleCompany" type="hidden" id="txtSingleCompany" value="LIVE" istrial="false">

	

	<div id="loginPasswordContainer">
		<span id="lblSignIn" class="signin_caption">Enter credentials</span>
		<input name="ctl00$phUser$txtUser" type="text" id="txtUser" class="login_user border-box" autocomplete="username" placeholder="Username">
		<input name="ctl00$phUser$txtPass" type="password" id="txtPass" class="login_pass border-box" placeholder="Password" autocomplete="current-password" style="width:100%;">
	</div>
				
	
	<input name="ctl00$phUser$txtVeryDummyPass" type="hidden" id="txtVeryDummyPass">

	
	

	
	<div id="multiFactorTip" class="multi-factor-tip" style="display: none;">
		<div class="auth-caption">
			<i id="multiFactorIcon" class="ac ac-smartphone"></i>
			<span id="lbl2FactorCap" class="labelB">Two-Factor Authentication</span>
		</div>
		<span id="lb2Factor" class="labelB auth-info"></span>
		<input name="ctl00$phUser$oneTimePasswordText" type="text" id="oneTimePasswordText" class="login_user border-box pass-text" style="display: none;">
		<input id="mfLoginButton" name="mfLoginButton" value="Sign In" type="button" style="float: left; margin-top: 10px; margin-bottom: 10px; display: none" class="login_button">
		<div style="display: none; margin: 10px 0px; clear: both" id="rememberContainer">
			<span class="label"><input id="rememberDevice" type="checkbox" name="ctl00$phUser$rememberDevice" checked="checked"><label for="rememberDevice">Do not request confirmation on this device again</label></span>
		</div>
		<span id="resendTimer" class="labelB auth-info" style="display: none; clear: both"></span>
		<input id="resendButton" name="resendButton" value="Send again" onclick="resend();" type="button" style="float: left; margin-top: 10px; margin-bottom: 10px; display: none; clear: both" class="login_button">
		<div id="noDeviceSend" style="display: none; clear: both">
			<span id="noDeviceLabel" class="labelB auth-info">3. Approve push request on your mobile device:</span>
			<input id="noDeviceSendButton" name="noDeviceSendButton" value="Send request to device" onclick="startProviderSend('MobilePush', false, 'smartphone', true);" type="button" style="float: left; width: 219px; margin-top: 10px; margin-bottom: 10px;" class="login_button">
		</div>
		<input type="hidden" name="ctl00$phUser$MultiFactorPipelineNotStarted" id="MultiFactorPipelineNotStarted" value="true">
		<input type="hidden" name="ctl00$phUser$MultiFactorWarninigWasShown" id="MultiFactorWarninigWasShown">
	</div>
	<div id="retryAfterDeny" class="multi-factor-method" style="display: none">
		<input value="Try Again" onclick="window.location.reload(); return false;" class="login_button" style="text-align: center; float: left;">
	</div>

	
	

	<div id="openOtherMultiFactor" class="multi-factor-method" style="display: none; clear:both;">
		<a class="login_link multy-factor" href="javascript:void 0" onclick="showMultiFactorMenu(); return false;">
			Use another authentication method
		</a>
	</div>
	<div id="multiFactorMenu" style="display: none" class="list-group auth">
		<div class="auth-caption">
			<span id="lbl2FactorMethod" class="labelB">Select Authentication Method:</span>
		</div>
		
				<div id="SmsbuttonId" class="multiFactorMenuItem list-group-item" onclick="startProviderSend('Sms', 
    true, 'message', false );">
					<i class="ac ac-fw ac-message"></i>
					<span>Receive code in SMS</span>
				</div>
		
				<div id="MobilePushbuttonId" class="multiFactorMenuItem list-group-item" onclick="startProviderSend('MobilePush', 
    false, 'smartphone', false );">
					<i class="ac ac-fw ac-smartphone"></i>
					<span>Receive push notification on the confirmation device</span>
				</div>
		
				<div id="EmailbuttonId" class="multiFactorMenuItem list-group-item" onclick="startProviderSend('Email', 
    true, 'email_outline', false );">
					<i class="ac ac-fw ac-email_outline"></i>
					<span>Receive code by email</span>
				</div>
		
				<div id="AccessCodebuttonId" class="multiFactorMenuItem list-group-item" onclick="startProviderSend('AccessCode', 
    true, 'unlock', false );">
					<i class="ac ac-fw ac-unlock"></i>
					<span>Enter code generated in mobile app or from the list</span>
				</div>
		
	</div>

	<div id="loginButtonsContainer">
		<input type="submit" name="ctl00$phUser$btnLogin" value="Sign In" onclick="return wrapClick(this, 'isReal', realFlagContainer, doLogin, multiFactorNotStarted || secureTenantCheck);" id="btnLogin" class="login_button">
		
		
		<input name="ctl00$phUser$txtDummyInstallationID" type="hidden" id="txtDummyInstallationID" value="FAA96EBE-02AFE27F-F5CB1356-3907A3C7-20724054">
		<a id="lnkForgotPswd" class="login_link" href="https://acumatica.superiorlubricants.com/Frames/PasswordRemind.aspx?ReturnUrl=%2f">Forgot your credentials?</a>
	</div>
	<script type="text/javascript">

        var connection = new signalR.HubConnectionBuilder()
            .withUrl(normalizeSignalRUrl("signalr/hubs/MultifactorHub")
                , {
                    transport: signalR.HttpTransportType.WebSockets
                    ,skipNegotiation: true
                }
            )
            .configureLogging(signalR.LogLevel.Debug)
            .build();
        var resend = function() {};
        var timeoutId = 0;

        var multiFactorNotStarted = $("[id$=MultiFactorPipelineNotStarted]").val() === 'true';
        var secureTenantCheck = $("[id$=txtSecureTenantFlowState]").val() === 'LoginPassTenantSelection';

        var trialMessage = 'By clicking the \"Agree\" button below I acknowledge and understand that I am accessing an unlicensed tenant and such access and use is not for Production as defined by the Acumatica End-User License Agreement (\"EULA\") or the Acumatica Subscription SaaS Agreement (\"SaaS Agreement\"). Any use of this tenant for Production purposes is not authorized under the EULA or the SaaS Agreement.';
        var trialTitle = 'Agree to Proceed';
        var agreeBtnLabel = 'Agree';
        var disagreeBtnLabel = 'Disagree';

        function normalizeSignalRUrl(url) {
            if (url.lastIndexOf("https://", 0) === 0 || url.lastIndexOf("http://", 0) === 0) {
                return url;
            }
            if (typeof window === "undefined" || !window || !window.document) {
                throw new Error("Cannot resolve '" + url + "'.");
            }
            var aTag = window.document.createElement("a");
            var base = aTag.baseURI;
            var baseIndex = base.indexOf("Frames");
            if (baseIndex > 0) base = base.substring(0, baseIndex);
            url = base + url;
            return url;
        }

		function onchkEulaChanged(checked)
		{
            btnLoginDisable(!checked);
		}

        var realFlagContainer = {
            isReal: false,
            isRealFederation: false,
            isRealOAuth: false,
            isRealOpenId: false
        }

        function wrapClick(e, isRealFlag, isRealFlagContainer, loginAction, needCheck) {
            if (isRealFlagContainer[isRealFlag] === true) {
                isRealFlagContainer[isRealFlag] = false;
                return loginAction(e);
            }

            var opt = {
                title: trialTitle,
                body: trialMessage,
                buttons: {
                    elements: [
                        {
                            text: agreeBtnLabel, click: function () {
                                isRealFlagContainer[isRealFlag] = true;
                                e.click();
                            }
                        },
                        { text: disagreeBtnLabel, }
                    ]
                }
            }


            if (needCheck) {
                var selectedOne = $('#txtSingleCompany');
                if (selectedOne) {
                    var istrial = selectedOne.attr('istrial');

                    if (istrial != null && istrial === 'true') {
                        adialog.dialog(opt);
                        return false;
                    }
                }

                var selectedItem = $('#cmbCompany').find(":selected");
                if (selectedItem) {
                    var istrial = selectedItem.attr('istrial');

                    if (istrial != null && istrial === 'true') {
                        adialog.dialog(opt);
                        return false;
                    }
                }
            } 

            isRealFlagContainer[isRealFlag] = true;
            return wrapClick(e, isRealFlag, isRealFlagContainer, loginAction, needCheck);
        }

        function doLogin(e) {
            var multiFactorNotStarted = $("[id$=MultiFactorPipelineNotStarted]").val() === 'true';

            var login = $("[id$=txtUser]").val();
            if (!login) return false;

            var isOutlookPlugin = localStorage.getItem('doRedirect');
            if (isOutlookPlugin) {
                var lang = $('[id$=cmbLang]').val();
                if (lang) {
                    localStorage.setItem('acumaticaLocale', lang);
                }
            }

			window.delayedCallback = true;
			clearInterval(timeoutId);
			if (e == null)
				e = window.event;
			if (e && (e.ctrlKey || e.shiftKey) && e.preventDefault != null)
				e.preventDefault();
			
			if (multiFactorNotStarted) {
				disableLoginFields();
				startTwoFactorPipeline();
				return false;
			}
			else {
				delete window.delayedCallback;
			}
		}

        function startTwoFactorPipeline() {
            connection.on("setOneTimePassword",
                function(oneTimePassword, correlationCode) {
                    $('[id$=oneTimePasswordText]').val(oneTimePassword);
                    $("[id$=MultiFactorPipelineNotStarted]").val('false');
                    btnLoginDisable(false);
                    var btnLogin = document.getElementById('btnLogin');
                    realFlagContainer.isReal = true;
                    btnLogin.click();
                });

            connection.on("denyAcceptTwoFactor",
                function(correlationCode) {
                    $('[id$=oneTimePasswordText]').val("");
                    $("#lblMsg").text("The confirmation request has been rejected. If you rejected it by mistake, click the Try Again button to try to sign in again.");
                    $("#openOtherMultiFactor").hide();
                    $(".multi-factor-tip").hide();
                    $("[id$=txtUser]").hide();
                    $('#retryAfterDeny').show();
                });
            startHub(0);
        }

		function btnLoginDisable(value) {
			var btnLogin = document.getElementById('btnLogin');
			if (!btnLogin) return;
			btnLogin.disabled = !!value;
		}

		function disableLoginFields(disableCompany) {
			$("[id$=txtUser]").attr('readonly', 'readonly');
			$("[id$=txtPass]").attr('readonly', 'readonly');
			if ((disableCompany || "") != "none") $("[id$=cmbCompany] option:not([selected])").attr('disabled', 'disabled');
			btnLoginDisable(true);
			$("#lblMsg").text("");
			document.body.style.cursor = 'wait';
		}

		function enableLoginFields(withUser) {
            if (withUser) $("[id$=txtUser]").attr('readonly', null);
			$("[id$=txtPass]").attr('readonly', null);
			$("[id$=cmbCompany] option:not([selected])").attr('disabled', null);
			btnLoginDisable(false);
			document.body.style.cursor = '';
		}

		function hideLoginFields() {
			$("[id$=txtPass]").hide();
			$("[id$=lblTenant]").hide();
			$("[id$=cmbCompany]").hide();
			$("[id$=txtSecureTenantNameDisplay]").hide();
			$("[id$=btnLogin]").hide();
			$("#login_ext").hide();
		}

        function startHub(retryCounter) {
            console.log("Start hub connection");
            $('#mfLoginButton').click(function () {
                realFlagContainer.isReal = true;
                btnLoginDisable(false);
                document.getElementById('btnLogin').click();
            });
            if(connection.connection.connectionState === 2)
                connection.start()
                    .then(r=>
                    {
                        window.console.log("Hub connection started; transport = "+connection.transport);
                        startProviderSend("MobilePush", false, "smartphone", false);
                    })
                    .catch(e => {
                        window.console.log(e);
                        if (retryCounter < 5) {
                            setTimeout(function() {
                                startHub(retryCounter+1);
                            }, 2000);
                        } else {
                            $("[id$=MultiFactorPipelineNotStarted]").val('false');
                            var btnLogin = document.getElementById('btnLogin');
                            realFlagContainer.isReal = true;
                            enableLoginFields(true);
                            btnLogin.click();
                        }
                    });
        }

        function showMultiFactorMenu()
        {
            $("#multiFactorMenu").show();
            $('[id$=oneTimePasswordText]').hide();
            $("#openOtherMultiFactor").hide();
            $('#multiFactorTip').hide();
            $('#noDeviceSend').hide();
            $("#mfLoginButton").hide();
            stopTimer();
        }

        function stopTimer() {
            if(timeoutId!=0)
                clearInterval(timeoutId);
            $("#resendTimer").hide();
            $("#resendTimer").html("");
            $("#resendButton").hide();
        }

        function hideMultiFactorMenu()
        {
            $("#multiFactorMenu").hide();
            $("#openOtherMultiFactor").show();
            $('#multiFactorTip').show();
            document.getElementById("lnkForgotPswd").classList.add("multy-factor");
            document.getElementById("lblSignIn").innerHTML = "Username";

        }

        function SetVisibilityForMultiFactorMenuItems(providers)
        {
            $(".multiFactorMenuItem").hide();
            for (i = 0; i < providers.length; i++)
            {
                $("#" + providers[i] + "buttonId").show();
            }
        };

        function startProviderSend(providerType, showTextbox, iconName, noDeviceSend)
        {
            var login = $("[id$=txtUser]").val();
            var pass = $("[id$=txtPass]").val();
			
            startTwoFactorPipeLine(providerType, login, pass, 0, showTextbox, iconName, noDeviceSend);
        }

       

        function startTwoFactorPipeLine(providerType, login, pass, retryCount, showTextbox, iconName, noDeviceSend) {
            $("#lblMsg").text("");
            if (connection.state === "Disconnected") {
                connection.start().then(r => {
                    window.console.log("Hub connection started; transport = "+connection.transport);
                    startTwoFactorPipeLine(providerType, login, pass, retryCount, showTextbox, iconName, noDeviceSend);
                }).catch (e=> {
                    window.console.log(e);
                    document.getElementById('btnLogin').click();
                });
            }
            //var hub = $.connection.multifactorHub;
            console.log("Start two factor pipeline, provider: " + providerType);
            var lang=$('[id$=cmbLang]').val();
            connection.invoke("startTwoFactorPipeline", login, pass, providerType, lang).then(result =>
            {
                console.log("Success");
                stopTimer();
                if (result.isMultiFactor>0) {
                    $("#lb2Factor").html(result.text.replace(new RegExp("\r\n", "g"), "<br />"));
                    $('#multiFactorTip').show();
                    $('#multiFactorIcon').attr('class', 'ac ac-' + iconName);
                    document.body.style.cursor = '';
                    hideLoginFields();
                    if (showTextbox&&!result.isError) {
                        $('[id$=oneTimePasswordText]').show();
                        $("#mfLoginButton").show();
                        $("[id$=MultiFactorPipelineNotStarted]").val('false');
                    } else {
                        $('[id$=oneTimePasswordText]').hide();
                        $("#mfLoginButton").hide();
                    }
                    SetVisibilityForMultiFactorMenuItems(result.providers);
                    hideMultiFactorMenu();
                    if (result.resendTimer > 0&&!(result.hasNoDevice&&noDeviceSend))
                        startResendTimer(result.resendTimer, providerType, showTextbox, iconName, false);
                    if (result.isMultiFactor == 1&&!result.hasNoDevice) {
                        $("#rememberContainer").show();
                    } else {
                        $("#rememberContainer").hide();
                    }
                    if (result.hasNoDevice) {
                        $("#noDeviceSend").show();
                        if (noDeviceSend) {
                            $("#lblMsg").text("There is no registered device, so the confirmation request could not be sent. Please follow the instructions below to register a device. If you are not able to register a device now, use another authentication method.");
                        }
                    } else {
                        $("#noDeviceSend").hide();
                    }
                    delete window.delayedCallback;
                } else {
                    $("[id$=MultiFactorPipelineNotStarted]").val('false');
                    realFlagContainer.isReal = true;
                    btnLoginDisable(false);
                    document.getElementById('btnLogin').click();
                    btnLoginDisable(true);
                }
                if (result.isError)
                {
                    $("#lb2Factor").addClass("error");
                    $("#rememberContainer").hide();
                    stopTimer();
                }
                else
                {
                    $("#lb2Factor").removeClass("error");
                }
            }).catch(error => {
                if (retryCount < 5) {
                    console.log('Invocation of startTwoFactorPipeline failed. Error: ' + error + '; Retry');
                    startTwoFactorPipeLine(providerType, login, pass, retryCount + 1, showTextbox, iconName, noDeviceSend);
                } else {
                    console.log('Invocation of startTwoFactorPipeline failed. Error: ' + error);
                    $("#lblMsg").text(error);
                    enableLoginFields(true);
                }
            });
        }

        function startResendTimer(time, providerType, showTextbox, iconName, noDeviceSend) {
            resend = function() {
                $("#resendButton").hide();
                startProviderSend(providerType, showTextbox, iconName, noDeviceSend);
            };
            var setTimerSpan = function(countDown) {
                var minutes = Math.floor(countDown / 60);
                var seconds = "0"+countDown % 60;
                $("#resendTimer")
                    .html("You will be able to re-send the code after "+minutes+":"+seconds.substr(seconds.length-2));
            };
            if (time === 0)
                $("#resendButton").show();
            else {
                $("#resendTimer").show();
                setTimerSpan(time);
                timeoutId = setInterval(function() {
					
                    if (time <= 0) {
                        $("#resendButton").show();
                        $("#resendTimer").hide();
                        $("#resendTimer").html("");
                        clearInterval(timeoutId);
                        timeoutId = 0;
                    }
                    time--;
                    setTimerSpan(time);
                }, 1000);
            }
        }

        function ShowNoDeviceSendButton() {
            $("#noDeviceSend").show();
        };
    </script>

				</div>
				<div id="login_ext">
					
	
	<!-- Oidc providers will be added dinamically here -->
	

				</div>
				
	<div id="login_info" style="display:none;">
		<div id="logOutReasone" style="display:none;">
			<div id="logOutReasoneMsg" class="login_error">Last update was unsuccessful.</div>
		</div>
		<div id="dbmsMisconfigured" style="display:none;">
			<div id="dbmsProblems" class="login_error">There are problems on database server side:</div>
			<div id="dbmsMisconfiguredLabel" class="label">Contact server administrator.</div>
		</div>
		<div id="updateError" style="display:none;">
			<div id="updateErrorMsg" class="login_error">Last update was unsuccessful.</div>
			<div id="updateErrorLabel" class="label">Contact server administrator.</div>
		</div>
		<div id="customizationError" style="display:none;">
			<div id="customizationErrorMsg" class="login_error">Warning: customization failed to apply automatically after the upgrade.</div>
			<div id="customizationErrorLabel" class="label">Some functionality may be unavailable.<br> Contact server administrator.<br>
Click <a href="#" onclick="document.getElementById('custErrorDetails').style.display='';">here</a>
to view details about this error.</div>
			<div style="display:none; width: 100%; height: 200px; margin-top: 10px;" id="custErrorDetails">
				<pre id="custErrorContent"></pre>
			</div>
		</div>
		<div id="passwordRecoveryError" style="display:none">
			<div id="passwordRecoveryErrorMsg" class="login_error"></div>
		</div>
	</div>

			</div>

			<div id="login_copyright" class="border-box" style="display: block;">
				<div id="login_links">
					
	

				</div>

				<div id="login_customization">
					<div class="customization-dlg">
						<div class="customization-dlg-top">
							<span class="customization-dlg-top-title">
							<span id="lblCustomizationDlgTopTitle" class="labelH">Customization details</span>
							</span>
							<span class="ac ac-close customization-dlg-top-close"></span>
						</div>
						<div class="customization-dlg-body">
							<span id="lblCstProjects" class="labelH"><ul><li>JustActions13</li><li>AcumaticaPaymentsPOS[23r2][1.0.25]</li><li>AcumaticaPDFAnnotator</li><li>TNDocEx11224</li><li>SuperiorMain102324</li><li>SuperiorBase102324</li><li>TuxtonBestpass23R2</li></ul></span>
						</div>
					</div>
				</div>
				<span id="lblCopy" class="labelH" style="cursor:pointer;">Copyright © 2005-2024 Acumatica, Inc. All rights reserved.<br>Acumatica Cloud ERP 2023 R2<br>Build 23.212.0024 +</span>
			</div>
		</div>
		<script type="text/javascript">
			initLoginImage();
			window.onresize = resizeLoginImage;
			var customizationUi = {
				extBtnId: "lblCopy",
				containerId: "login_customization",
				customizationDlgClass: "customization-dlg",
				closeBtnClass: "customization-dlg-top-close"
			}
			customizationUi.extBtn = document.getElementById(customizationUi.extBtnId);
			var versionBuildTxt = customizationUi.extBtn.innerText;
			if (versionBuildTxt.lastIndexOf("+") == versionBuildTxt.length - 1) {
				
				customizationUi.container = document.getElementById(customizationUi.containerId);
				customizationUi.customizationDlg = customizationUi.container.querySelector("." + customizationUi.customizationDlgClass);
				customizationUi.closeBtn = customizationUi.container.querySelector("." + customizationUi.closeBtnClass);

				customizationUi.extBtn.addEventListener("click", function () {
					customizationUi.container.style.display = "flex";
				});
				customizationUi.closeBtn.addEventListener("click", function () {
					customizationUi.container.style.display = 'none';
				});
				customizationUi.customizationDlg.addEventListener("dblclick", function () {
					customizationUi.container.style.display = 'none';
				});
			}
		</script>
		
	<script type="text/javascript">
        window.onload = function ()
        {
            try
            {
                if (window != window.top && window.top.location.origin == window.location.origin)
                {
                    if (window.top.location.pathname.split("/")[1] == window.location.pathname.split("/")[1]) {
                        window.top.location.href = window.top.location.href;
                    }
                }
            }
            catch (ex) { }
            var cmbCompanyEl = document.getElementById("cmbCompany");
            if (cmbCompanyEl) cmbCompanyEl.addEventListener("change", function (el) {
                disableLoginFields("none");
            });
            document.getElementById("login_data").style.paddingBottom = (document.getElementById("login_copyright").clientHeight + 40) + "px";
            var editor = document.form1['txtUser'];
            if (editor == null || editor.readOnly) editor = document.form1['txtNewPassword'];
            if (editor && !editor.readOnly) editor.focus();	    }
    </script>

	</form>


</body></html>