Server IP : 150.95.80.236 / Your IP : 18.117.77.73 Web Server : Apache System : Linux host-150-95-80-236 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : social-telecare ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/pcu.in.th/uat.pcu.in.th/demo15/src/js/custom/authentication/sign-in/ |
Upload File : |
"use strict"; // Class Definition var KTSigninTwoSteps = function() { // Elements var form; var submitButton; // Handle form var handleForm = function(e) { // Handle form submit submitButton.addEventListener('click', function (e) { e.preventDefault(); var validated = true; var inputs = [].slice.call(form.querySelectorAll('input[maxlength="1"]')); inputs.map(function (input) { if (input.value === '' || input.value.length === 0) { validated = false; } }); if (validated === true) { // Show loading indication submitButton.setAttribute('data-kt-indicator', 'on'); // Disable button to avoid multiple click submitButton.disabled = true; // Simulate ajax request setTimeout(function() { // Hide loading indication submitButton.removeAttribute('data-kt-indicator'); // Enable button submitButton.disabled = false; // Show message popup. For more info check the plugin's official documentation: https://sweetalert2.github.io/ Swal.fire({ text: "You have been successfully verified!", icon: "success", buttonsStyling: false, confirmButtonText: "Ok, got it!", customClass: { confirmButton: "btn btn-primary" } }).then(function (result) { if (result.isConfirmed) { inputs.map(function (input) { input.value = ''; }); } }); }, 1000); } else { swal.fire({ text: "Please enter valid securtiy code and try again.", icon: "error", buttonsStyling: false, confirmButtonText: "Ok, got it!", customClass: { confirmButton: "btn fw-bold btn-light-primary" } }).then(function() { KTUtil.scrollTop(); }); } }); } // Public functions return { // Initialization init: function() { form = document.querySelector('#kt_sing_in_two_steps_form'); submitButton = document.querySelector('#kt_sing_in_two_steps_submit'); handleForm(); } }; }(); // On document ready KTUtil.onDOMContentLoaded(function() { KTSigninTwoSteps.init(); });