Server IP : 150.95.80.236 / Your IP : 18.118.166.106 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/assets/js/custom/modals/ |
Upload File : |
"use strict"; var KTCreateAccount = function() { var e, t, i, o, s, r, a = []; return { init: function() { (e = document.querySelector("#kt_modal_create_account")) && new bootstrap.Modal(e), t = document.querySelector("#kt_create_account_stepper"), i = t.querySelector("#form_298q"), o = t.querySelector('[data-kt-stepper-action="submit"]'), s = t.querySelector('[data-kt-stepper-action="next"]'), (r = new KTStepper(t)).on("kt.stepper.changed", (function(e) { // console.log(r.getCurrentStepIndex()); 5 === r.getCurrentStepIndex() ? ( o.classList.remove("d-none"), o.classList.add("d-inline-block"), s.classList.add("d-none") ) : ( o.classList.remove("d-inline-block"), o.classList.remove("d-none"), s.classList.remove("d-none") ) })), r.on("kt.stepper.next", (function(e) { // console.log("stepper.next กูอยู่นี่ "); var t = a[e.getCurrentStepIndex() - 1]; t ? t.validate().then((function(t) { console.log("validated!"), "Valid" == t ? (e.goNext(), KTUtil.scrollTop()) : Swal.fire({ text: "กรุณากรอกข้อมูลให้ครบถ้วน", icon: "error", buttonsStyling: !1, confirmButtonText: "ตกลง", customClass: { confirmButton: "btn btn-light" } }).then((function() { KTUtil.scrollTop() })) })) : (e.goNext(), KTUtil.scrollTop() ) })), r.on("kt.stepper.previous", (function(e) { // console.log("stepper.previous"), e.goPrevious(), KTUtil.scrollTop() })), a.push(FormValidation.formValidation(i, { fields: { }, plugins: { trigger: new FormValidation.plugins.Trigger, bootstrap: new FormValidation.plugins.Bootstrap5({ rowSelector: ".fv-row", eleInvalidClass: "", eleValidClass: "" }) } })), a.push(FormValidation.formValidation(i, { fields: { }, plugins: { trigger: new FormValidation.plugins.Trigger, bootstrap: new FormValidation.plugins.Bootstrap5({ rowSelector: ".fv-row", eleInvalidClass: "", eleValidClass: "" }) } })), a.push(FormValidation.formValidation(i, { fields: { ans2q_1: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans2q_2: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans9q_1: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans9q_2: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans9q_3: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans9q_4: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans9q_5: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans9q_6: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans9q_7: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans9q_8: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans9q_9: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, }, plugins: { trigger: new FormValidation.plugins.Trigger, bootstrap: new FormValidation.plugins.Bootstrap5({ rowSelector: ".fv-row", eleInvalidClass: "", eleValidClass: "" }) } })), a.push(FormValidation.formValidation(i, { fields: { ans8q_1: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans8q_2: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans8q_3: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans8q_4: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans8q_5: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans8q_6: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans8q_7: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans8q_8: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, ans8q_9: { validators: { notEmpty: { message: "กรุณากรอกข้อมูลให้ครบถ้วน" } } }, }, plugins: { trigger: new FormValidation.plugins.Trigger, bootstrap: new FormValidation.plugins.Bootstrap5({ rowSelector: ".fv-row", eleInvalidClass: "", eleValidClass: "" }) } })), o.addEventListener("click", (function(e) { a[3].validate().then((function(t) { console.log("validated!"), "Valid" == t ? (e.preventDefault(), o.disabled = !0, o.setAttribute("data-kt-indicator", "on"), setTimeout((function() { o.removeAttribute("data-kt-indicator"), o.disabled = !1, r.goNext() }), 2e3)) : Swal.fire({ text: "Sorry, looks like there are some errors detected, please try again.", icon: "error", buttonsStyling: !1, confirmButtonText: "Ok, got it!", customClass: { confirmButton: "btn btn-light" } }).then((function() { KTUtil.scrollTop() })) })) })), $(i.querySelector('[name="card_expiry_month"]')).on("change", (function() { a[3].revalidateField("card_expiry_month") })), $(i.querySelector('[name="card_expiry_year"]')).on("change", (function() { a[3].revalidateField("card_expiry_year") })), $(i.querySelector('[name="business_type"]')).on("change", (function() { a[2].revalidateField("business_type") })), $(i.querySelector('[name="covid"]')).on("change", (function() { a[3].revalidateField("covid") })) } } }(); KTUtil.onDOMContentLoaded((function() { KTCreateAccount.init() }));