NG1NDEX
Server IP : 150.95.80.236  /  Your IP : 3.148.105.87
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_editcase_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_editcase"),
                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: {
                        case_tname: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                         case_name: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                         idcard: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                        case_hn: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                        case_sex: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                        case_bday: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                        case_nation: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                        case_race: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                        case_religion: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                        case_marital: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                        case_education: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                        case_privilege: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                        case_career: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                        admit_date:{
                            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: {
                  
                        case_tel: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                        case_address: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                        case_moo: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                          case_province: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                           case_umpher: {
                            validators: {
                                notEmpty: {
                                    message: "กรุณากรอกข้อมูลให้ครบถ้วน"
                                }
                            }
                        },
                        case_tumbol: {
                            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: {
                        case_withre : {
                            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: {
                        
                        
                            
                    },
                    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="case_province"]')).on("change", (function() {
                    a[1].revalidateField("case_province")
                })),
                $(i.querySelector('[name="case_umpher"]')).on("change", (function() {
                    a[1].revalidateField("case_umpher")
                })),
                $(i.querySelector('[name="case_tumbol"]')).on("change", (function() {
                    a[1].revalidateField("case_tumbol")
                })),
                $(i.querySelector('[name="case_country"]')).on("change", (function() {
                    a[1].revalidateField("case_country")
                }))
                
                
        }
    }
}();
KTUtil.onDOMContentLoaded((function() {
    KTCreateAccount.init()
}));

Anon7 - 2022
AnonSec Team