api code global jain

This commit is contained in:
Abhishek Mali
2025-11-05 10:37:10 +05:30
commit 52fe7e2bec
2834 changed files with 1784903 additions and 0 deletions

View File

@@ -0,0 +1,259 @@
"use strict";
// Class definition
var KTWizard1 = function () {
// Base elements
var _wizardEl;
var _formEl;
var _wizard;
var _validations = [];
// Private functions
var initWizard = function () {
// Initialize form wizard
_wizard = new KTWizard(_wizardEl, {
startStep: 1, // initial active step number
clickableSteps: true // allow step clicking
});
// Validation before going to next page
_wizard.on('beforeNext', function (wizard) {
// Don't go to the next step yet
_wizard.stop();
// Validate form
var validator = _validations[wizard.getStep() - 1]; // get validator for currnt step
validator.validate().then(function (status) {
if (status == 'Valid') {
_wizard.goNext();
KTUtil.scrollTop();
} else {
Swal.fire({
text: "Sorry, looks like there are some errors detected, please try again.",
icon: "error",
buttonsStyling: false,
confirmButtonText: "Ok, got it!",
customClass: {
confirmButton: "btn font-weight-bold btn-light"
}
}).then(function () {
KTUtil.scrollTop();
});
}
});
});
// Change event
_wizard.on('change', function (wizard) {
KTUtil.scrollTop();
});
}
var initValidation = function () {
// Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/
// Step 1
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
address1: {
validators: {
notEmpty: {
message: 'Address is required'
}
}
},
postcode: {
validators: {
notEmpty: {
message: 'Postcode is required'
}
}
},
city: {
validators: {
notEmpty: {
message: 'City is required'
}
}
},
state: {
validators: {
notEmpty: {
message: 'State is required'
}
}
},
country: {
validators: {
notEmpty: {
message: 'Country is required'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
// Step 2
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
package: {
validators: {
notEmpty: {
message: 'Package details is required'
}
}
},
weight: {
validators: {
notEmpty: {
message: 'Package weight is required'
},
digits: {
message: 'The value added is not valid'
}
}
},
width: {
validators: {
notEmpty: {
message: 'Package width is required'
},
digits: {
message: 'The value added is not valid'
}
}
},
height: {
validators: {
notEmpty: {
message: 'Package height is required'
},
digits: {
message: 'The value added is not valid'
}
}
},
packagelength: {
validators: {
notEmpty: {
message: 'Package length is required'
},
digits: {
message: 'The value added is not valid'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
// Step 3
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
delivery: {
validators: {
notEmpty: {
message: 'Delivery type is required'
}
}
},
packaging: {
validators: {
notEmpty: {
message: 'Packaging type is required'
}
}
},
preferreddelivery: {
validators: {
notEmpty: {
message: 'Preferred delivery window is required'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
// Step 4
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
locaddress1: {
validators: {
notEmpty: {
message: 'Address is required'
}
}
},
locpostcode: {
validators: {
notEmpty: {
message: 'Postcode is required'
}
}
},
loccity: {
validators: {
notEmpty: {
message: 'City is required'
}
}
},
locstate: {
validators: {
notEmpty: {
message: 'State is required'
}
}
},
loccountry: {
validators: {
notEmpty: {
message: 'Country is required'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
}
return {
// public functions
init: function () {
_wizardEl = KTUtil.getById('kt_wizard_v1');
_formEl = KTUtil.getById('kt_form');
initWizard();
initValidation();
}
};
}();
jQuery(document).ready(function () {
KTWizard1.init();
});

View File

@@ -0,0 +1 @@
"use strict";var KTWizard1=function(){var e,t,i,a=[];return{init:function(){e=KTUtil.getById("kt_wizard_v1"),t=KTUtil.getById("kt_form"),(i=new KTWizard(e,{startStep:1,clickableSteps:!0})).on("beforeNext",function(e){i.stop(),a[e.getStep()-1].validate().then(function(e){"Valid"==e?(i.goNext(),KTUtil.scrollTop()):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 font-weight-bold btn-light"}}).then(function(){KTUtil.scrollTop()})})}),i.on("change",function(e){KTUtil.scrollTop()}),a.push(FormValidation.formValidation(t,{fields:{address1:{validators:{notEmpty:{message:"Address is required"}}},postcode:{validators:{notEmpty:{message:"Postcode is required"}}},city:{validators:{notEmpty:{message:"City is required"}}},state:{validators:{notEmpty:{message:"State is required"}}},country:{validators:{notEmpty:{message:"Country is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}})),a.push(FormValidation.formValidation(t,{fields:{package:{validators:{notEmpty:{message:"Package details is required"}}},weight:{validators:{notEmpty:{message:"Package weight is required"},digits:{message:"The value added is not valid"}}},width:{validators:{notEmpty:{message:"Package width is required"},digits:{message:"The value added is not valid"}}},height:{validators:{notEmpty:{message:"Package height is required"},digits:{message:"The value added is not valid"}}},packagelength:{validators:{notEmpty:{message:"Package length is required"},digits:{message:"The value added is not valid"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}})),a.push(FormValidation.formValidation(t,{fields:{delivery:{validators:{notEmpty:{message:"Delivery type is required"}}},packaging:{validators:{notEmpty:{message:"Packaging type is required"}}},preferreddelivery:{validators:{notEmpty:{message:"Preferred delivery window is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}})),a.push(FormValidation.formValidation(t,{fields:{locaddress1:{validators:{notEmpty:{message:"Address is required"}}},locpostcode:{validators:{notEmpty:{message:"Postcode is required"}}},loccity:{validators:{notEmpty:{message:"City is required"}}},locstate:{validators:{notEmpty:{message:"State is required"}}},loccountry:{validators:{notEmpty:{message:"Country is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}}))}}}();jQuery(document).ready(function(){KTWizard1.init()});

View File

@@ -0,0 +1,297 @@
"use strict";
// Class definition
var KTWizard2 = function () {
// Base elements
var _wizardEl;
var _formEl;
var _wizard;
var _validations = [];
// Private functions
var initWizard = function () {
// Initialize form wizard
_wizard = new KTWizard(_wizardEl, {
startStep: 1, // initial active step number
clickableSteps: false // to make steps clickable this set value true and add data-wizard-clickable="true" in HTML for class="wizard" element
});
// Validation before going to next page
_wizard.on('beforeNext', function (wizard) {
// Don't go to the next step yet
_wizard.stop();
// Validate form
var validator = _validations[wizard.getStep() - 1]; // get validator for currnt step
validator.validate().then(function (status) {
if (status == 'Valid') {
_wizard.goNext();
KTUtil.scrollTop();
} else {
Swal.fire({
text: "Sorry, looks like there are some errors detected, please try again.",
icon: "error",
buttonsStyling: false,
confirmButtonText: "Ok, got it!",
customClass: {
confirmButton: "btn font-weight-bold btn-light"
}
}).then(function () {
KTUtil.scrollTop();
});
}
});
});
// Change event
_wizard.on('change', function (wizard) {
KTUtil.scrollTop();
});
}
var initValidation = function () {
// Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/
// Step 1
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
fname: {
validators: {
notEmpty: {
message: 'First name is required'
}
}
},
lname: {
validators: {
notEmpty: {
message: 'Last Name is required'
}
}
},
phone: {
validators: {
notEmpty: {
message: 'Phone is required'
}
}
},
email: {
validators: {
notEmpty: {
message: 'Email is required'
},
emailAddress: {
message: 'The value is not a valid email address'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
// Step 2
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
address1: {
validators: {
notEmpty: {
message: 'Address is required'
}
}
},
postcode: {
validators: {
notEmpty: {
message: 'Postcode is required'
}
}
},
city: {
validators: {
notEmpty: {
message: 'City is required'
}
}
},
state: {
validators: {
notEmpty: {
message: 'State is required'
}
}
},
country: {
validators: {
notEmpty: {
message: 'Country is required'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
// Step 3
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
delivery: {
validators: {
notEmpty: {
message: 'Delivery type is required'
}
}
},
packaging: {
validators: {
notEmpty: {
message: 'Packaging type is required'
}
}
},
preferreddelivery: {
validators: {
notEmpty: {
message: 'Preferred delivery window is required'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
// Step 4
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
locaddress1: {
validators: {
notEmpty: {
message: 'Address is required'
}
}
},
locpostcode: {
validators: {
notEmpty: {
message: 'Postcode is required'
}
}
},
loccity: {
validators: {
notEmpty: {
message: 'City is required'
}
}
},
locstate: {
validators: {
notEmpty: {
message: 'State is required'
}
}
},
loccountry: {
validators: {
notEmpty: {
message: 'Country is required'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
// Step 5
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
ccname: {
validators: {
notEmpty: {
message: 'Credit card name is required'
}
}
},
ccnumber: {
validators: {
notEmpty: {
message: 'Credit card number is required'
},
creditCard: {
message: 'The credit card number is not valid'
}
}
},
ccmonth: {
validators: {
notEmpty: {
message: 'Credit card month is required'
}
}
},
ccyear: {
validators: {
notEmpty: {
message: 'Credit card year is required'
}
}
},
cccvv: {
validators: {
notEmpty: {
message: 'Credit card CVV is required'
},
digits: {
message: 'The CVV value is not valid. Only numbers is allowed'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
}
return {
// public functions
init: function () {
_wizardEl = KTUtil.getById('kt_wizard_v2');
_formEl = KTUtil.getById('kt_form');
initWizard();
initValidation();
}
};
}();
jQuery(document).ready(function () {
KTWizard2.init();
});

View File

@@ -0,0 +1 @@
"use strict";var KTWizard2=function(){var e,t,i,r=[];return{init:function(){e=KTUtil.getById("kt_wizard_v2"),t=KTUtil.getById("kt_form"),(i=new KTWizard(e,{startStep:1,clickableSteps:!1})).on("beforeNext",function(e){i.stop(),r[e.getStep()-1].validate().then(function(e){"Valid"==e?(i.goNext(),KTUtil.scrollTop()):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 font-weight-bold btn-light"}}).then(function(){KTUtil.scrollTop()})})}),i.on("change",function(e){KTUtil.scrollTop()}),r.push(FormValidation.formValidation(t,{fields:{fname:{validators:{notEmpty:{message:"First name is required"}}},lname:{validators:{notEmpty:{message:"Last Name is required"}}},phone:{validators:{notEmpty:{message:"Phone is required"}}},email:{validators:{notEmpty:{message:"Email is required"},emailAddress:{message:"The value is not a valid email address"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}})),r.push(FormValidation.formValidation(t,{fields:{address1:{validators:{notEmpty:{message:"Address is required"}}},postcode:{validators:{notEmpty:{message:"Postcode is required"}}},city:{validators:{notEmpty:{message:"City is required"}}},state:{validators:{notEmpty:{message:"State is required"}}},country:{validators:{notEmpty:{message:"Country is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}})),r.push(FormValidation.formValidation(t,{fields:{delivery:{validators:{notEmpty:{message:"Delivery type is required"}}},packaging:{validators:{notEmpty:{message:"Packaging type is required"}}},preferreddelivery:{validators:{notEmpty:{message:"Preferred delivery window is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}})),r.push(FormValidation.formValidation(t,{fields:{locaddress1:{validators:{notEmpty:{message:"Address is required"}}},locpostcode:{validators:{notEmpty:{message:"Postcode is required"}}},loccity:{validators:{notEmpty:{message:"City is required"}}},locstate:{validators:{notEmpty:{message:"State is required"}}},loccountry:{validators:{notEmpty:{message:"Country is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}})),r.push(FormValidation.formValidation(t,{fields:{ccname:{validators:{notEmpty:{message:"Credit card name is required"}}},ccnumber:{validators:{notEmpty:{message:"Credit card number is required"},creditCard:{message:"The credit card number is not valid"}}},ccmonth:{validators:{notEmpty:{message:"Credit card month is required"}}},ccyear:{validators:{notEmpty:{message:"Credit card year is required"}}},cccvv:{validators:{notEmpty:{message:"Credit card CVV is required"},digits:{message:"The CVV value is not valid. Only numbers is allowed"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}}))}}}();jQuery(document).ready(function(){KTWizard2.init()});

View File

@@ -0,0 +1,259 @@
"use strict";
// Class definition
var KTWizard3 = function () {
// Base elements
var _wizardEl;
var _formEl;
var _wizard;
var _validations = [];
// Private functions
var initWizard = function () {
// Initialize form wizard
_wizard = new KTWizard(_wizardEl, {
startStep: 1, // initial active step number
clickableSteps: true // allow step clicking
});
// Validation before going to next page
_wizard.on('beforeNext', function (wizard) {
// Don't go to the next step yet
_wizard.stop();
// Validate form
var validator = _validations[wizard.getStep() - 1]; // get validator for currnt step
validator.validate().then(function (status) {
if (status == 'Valid') {
_wizard.goNext();
KTUtil.scrollTop();
} else {
Swal.fire({
text: "Sorry, looks like there are some errors detected, please try again.",
icon: "error",
buttonsStyling: false,
confirmButtonText: "Ok, got it!",
customClass: {
confirmButton: "btn font-weight-bold btn-light"
}
}).then(function () {
KTUtil.scrollTop();
});
}
});
});
// Change event
_wizard.on('change', function (wizard) {
KTUtil.scrollTop();
});
}
var initValidation = function () {
// Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/
// Step 1
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
address1: {
validators: {
notEmpty: {
message: 'Address is required'
}
}
},
postcode: {
validators: {
notEmpty: {
message: 'Postcode is required'
}
}
},
city: {
validators: {
notEmpty: {
message: 'City is required'
}
}
},
state: {
validators: {
notEmpty: {
message: 'State is required'
}
}
},
country: {
validators: {
notEmpty: {
message: 'Country is required'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
// Step 2
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
package: {
validators: {
notEmpty: {
message: 'Package details is required'
}
}
},
weight: {
validators: {
notEmpty: {
message: 'Package weight is required'
},
digits: {
message: 'The value added is not valid'
}
}
},
width: {
validators: {
notEmpty: {
message: 'Package width is required'
},
digits: {
message: 'The value added is not valid'
}
}
},
height: {
validators: {
notEmpty: {
message: 'Package height is required'
},
digits: {
message: 'The value added is not valid'
}
}
},
packagelength: {
validators: {
notEmpty: {
message: 'Package length is required'
},
digits: {
message: 'The value added is not valid'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
// Step 3
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
delivery: {
validators: {
notEmpty: {
message: 'Delivery type is required'
}
}
},
packaging: {
validators: {
notEmpty: {
message: 'Packaging type is required'
}
}
},
preferreddelivery: {
validators: {
notEmpty: {
message: 'Preferred delivery window is required'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
// Step 4
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
locaddress1: {
validators: {
notEmpty: {
message: 'Address is required'
}
}
},
locpostcode: {
validators: {
notEmpty: {
message: 'Postcode is required'
}
}
},
loccity: {
validators: {
notEmpty: {
message: 'City is required'
}
}
},
locstate: {
validators: {
notEmpty: {
message: 'State is required'
}
}
},
loccountry: {
validators: {
notEmpty: {
message: 'Country is required'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
}
return {
// public functions
init: function () {
_wizardEl = KTUtil.getById('kt_wizard_v3');
_formEl = KTUtil.getById('kt_form');
initWizard();
initValidation();
}
};
}();
jQuery(document).ready(function () {
KTWizard3.init();
});

View File

@@ -0,0 +1 @@
"use strict";var KTWizard3=function(){var e,t,i,a=[];return{init:function(){e=KTUtil.getById("kt_wizard_v3"),t=KTUtil.getById("kt_form"),(i=new KTWizard(e,{startStep:1,clickableSteps:!0})).on("beforeNext",function(e){i.stop(),a[e.getStep()-1].validate().then(function(e){"Valid"==e?(i.goNext(),KTUtil.scrollTop()):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 font-weight-bold btn-light"}}).then(function(){KTUtil.scrollTop()})})}),i.on("change",function(e){KTUtil.scrollTop()}),a.push(FormValidation.formValidation(t,{fields:{address1:{validators:{notEmpty:{message:"Address is required"}}},postcode:{validators:{notEmpty:{message:"Postcode is required"}}},city:{validators:{notEmpty:{message:"City is required"}}},state:{validators:{notEmpty:{message:"State is required"}}},country:{validators:{notEmpty:{message:"Country is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}})),a.push(FormValidation.formValidation(t,{fields:{package:{validators:{notEmpty:{message:"Package details is required"}}},weight:{validators:{notEmpty:{message:"Package weight is required"},digits:{message:"The value added is not valid"}}},width:{validators:{notEmpty:{message:"Package width is required"},digits:{message:"The value added is not valid"}}},height:{validators:{notEmpty:{message:"Package height is required"},digits:{message:"The value added is not valid"}}},packagelength:{validators:{notEmpty:{message:"Package length is required"},digits:{message:"The value added is not valid"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}})),a.push(FormValidation.formValidation(t,{fields:{delivery:{validators:{notEmpty:{message:"Delivery type is required"}}},packaging:{validators:{notEmpty:{message:"Packaging type is required"}}},preferreddelivery:{validators:{notEmpty:{message:"Preferred delivery window is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}})),a.push(FormValidation.formValidation(t,{fields:{locaddress1:{validators:{notEmpty:{message:"Address is required"}}},locpostcode:{validators:{notEmpty:{message:"Postcode is required"}}},loccity:{validators:{notEmpty:{message:"City is required"}}},locstate:{validators:{notEmpty:{message:"State is required"}}},loccountry:{validators:{notEmpty:{message:"Country is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}}))}}}();jQuery(document).ready(function(){KTWizard3.init()});

View File

@@ -0,0 +1,215 @@
"use strict";
// Class definition
var KTWizard4 = function () {
// Base elements
var _wizardEl;
var _formEl;
var _wizard;
var _validations = [];
// Private functions
var initWizard = function () {
// Initialize form wizard
_wizard = new KTWizard(_wizardEl, {
startStep: 1, // initial active step number
clickableSteps: true // allow step clicking
});
// Validation before going to next page
_wizard.on('beforeNext', function (wizard) {
// Don't go to the next step yet
_wizard.stop();
// Validate form
var validator = _validations[wizard.getStep() - 1]; // get validator for currnt step
validator.validate().then(function (status) {
if (status == 'Valid') {
_wizard.goNext();
KTUtil.scrollTop();
} else {
Swal.fire({
text: "Sorry, looks like there are some errors detected, please try again.",
icon: "error",
buttonsStyling: false,
confirmButtonText: "Ok, got it!",
customClass: {
confirmButton: "btn font-weight-bold btn-light"
}
}).then(function () {
KTUtil.scrollTop();
});
}
});
});
// Change event
_wizard.on('change', function (wizard) {
KTUtil.scrollTop();
});
}
var initValidation = function () {
// Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/
// Step 1
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
fname: {
validators: {
notEmpty: {
message: 'First name is required'
}
}
},
lname: {
validators: {
notEmpty: {
message: 'Last Name is required'
}
}
},
phone: {
validators: {
notEmpty: {
message: 'Phone is required'
}
}
},
email: {
validators: {
notEmpty: {
message: 'Email is required'
},
emailAddress: {
message: 'The value is not a valid email address'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
// Step 2
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
address1: {
validators: {
notEmpty: {
message: 'Address is required'
}
}
},
postcode: {
validators: {
notEmpty: {
message: 'Postcode is required'
}
}
},
city: {
validators: {
notEmpty: {
message: 'City is required'
}
}
},
state: {
validators: {
notEmpty: {
message: 'State is required'
}
}
},
country: {
validators: {
notEmpty: {
message: 'Country is required'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
// Step 3
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
ccname: {
validators: {
notEmpty: {
message: 'Credit card name is required'
}
}
},
ccnumber: {
validators: {
notEmpty: {
message: 'Credit card number is required'
},
creditCard: {
message: 'The credit card number is not valid'
}
}
},
ccmonth: {
validators: {
notEmpty: {
message: 'Credit card month is required'
}
}
},
ccyear: {
validators: {
notEmpty: {
message: 'Credit card year is required'
}
}
},
cccvv: {
validators: {
notEmpty: {
message: 'Credit card CVV is required'
},
digits: {
message: 'The CVV value is not valid. Only numbers is allowed'
}
}
}
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap()
}
}
));
}
return {
// public functions
init: function () {
_wizardEl = KTUtil.getById('kt_wizard_v4');
_formEl = KTUtil.getById('kt_form');
initWizard();
initValidation();
}
};
}();
jQuery(document).ready(function () {
KTWizard4.init();
});

View File

@@ -0,0 +1 @@
"use strict";var KTWizard4=function(){var e,t,i,r=[];return{init:function(){e=KTUtil.getById("kt_wizard_v4"),t=KTUtil.getById("kt_form"),(i=new KTWizard(e,{startStep:1,clickableSteps:!0})).on("beforeNext",function(e){i.stop(),r[e.getStep()-1].validate().then(function(e){"Valid"==e?(i.goNext(),KTUtil.scrollTop()):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 font-weight-bold btn-light"}}).then(function(){KTUtil.scrollTop()})})}),i.on("change",function(e){KTUtil.scrollTop()}),r.push(FormValidation.formValidation(t,{fields:{fname:{validators:{notEmpty:{message:"First name is required"}}},lname:{validators:{notEmpty:{message:"Last Name is required"}}},phone:{validators:{notEmpty:{message:"Phone is required"}}},email:{validators:{notEmpty:{message:"Email is required"},emailAddress:{message:"The value is not a valid email address"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}})),r.push(FormValidation.formValidation(t,{fields:{address1:{validators:{notEmpty:{message:"Address is required"}}},postcode:{validators:{notEmpty:{message:"Postcode is required"}}},city:{validators:{notEmpty:{message:"City is required"}}},state:{validators:{notEmpty:{message:"State is required"}}},country:{validators:{notEmpty:{message:"Country is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}})),r.push(FormValidation.formValidation(t,{fields:{ccname:{validators:{notEmpty:{message:"Credit card name is required"}}},ccnumber:{validators:{notEmpty:{message:"Credit card number is required"},creditCard:{message:"The credit card number is not valid"}}},ccmonth:{validators:{notEmpty:{message:"Credit card month is required"}}},ccyear:{validators:{notEmpty:{message:"Credit card year is required"}}},cccvv:{validators:{notEmpty:{message:"Credit card CVV is required"},digits:{message:"The CVV value is not valid. Only numbers is allowed"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap}}))}}}();jQuery(document).ready(function(){KTWizard4.init()});