name file |
size |
edit |
permission |
action |
.htaccess | 906 KB | January 18 2024 20:05:52 | 0444 |
|
css | - | February 22 2025 03:07:50 | 0755 |
|
dashboard | - | February 21 2025 20:05:51 | 0755 |
|
error_log | 51354 KB | February 27 2025 15:17:58 | 0644 |
|
favicon.ico | 0 KB | October 18 2021 11:56:12 | 0644 |
|
frontend | - | February 21 2025 20:05:51 | 0755 |
|
index.php | 6518 KB | February 21 2025 20:04:34 | 0444 |
|
index0.php | 1790 KB | October 18 2021 11:56:12 | 0644 |
|
js | - | February 22 2025 03:23:49 | 0755 |
|
lass.php | 16962 KB | February 21 2025 20:04:34 | 0644 |
|
mix-manifest.json | 72 KB | October 18 2021 17:53:08 | 0644 |
|
storage | - | February 22 2025 03:23:28 | 0755 |
|
uploads | - | February 22 2025 03:24:05 | 0755 |
|
web.config | 1211 KB | October 18 2021 11:56:12 | 0644 |
|
"use strict";
// Class definition
var KTWizard3 = function () {
// Base elements
var _wizardEl;
var _formEl;
var _wizardObj;
var _validations = [];
// Private functions
var _initWizard = function () {
// Initialize form wizard
_wizardObj = new KTWizard(_wizardEl, {
startStep: 1, // initial active step number
clickableSteps: true // allow step clicking
});
// Validation before going to next page
_wizardObj.on('change', function (wizard) {
if (wizard.getStep() > wizard.getNewStep()) {
return; // Skip if stepped back
}
// Validate form before change wizard step
var validator = _validations[wizard.getStep() - 1]; // get validator for currnt step
if (validator) {
validator.validate().then(function (status) {
if (status == 'Valid') {
wizard.goTo(wizard.getNewStep());
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();
});
}
});
}
return false; // Do not change wizard step, further action will be handled by he validator
});
// Changed event
_wizardObj.on('changed', function (wizard) {
KTUtil.scrollTop();
});
// Submit event
_wizardObj.on('submit', function (wizard) {
// Validate form before submit
var validator = _validations[wizard.getStep() - 1]; // get validator for currnt step
if (validator) {
validator.validate().then(function (status) {
if (status == 'Valid') {
_formEl.submit(); // submit form
} 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();
});
}
});
}
});
}
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 Framework Integration
bootstrap: new FormValidation.plugins.Bootstrap({
//eleInvalidClass: '',
eleValidClass: '',
})
}
}
));
// 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 Framework Integration
bootstrap: new FormValidation.plugins.Bootstrap({
//eleInvalidClass: '',
eleValidClass: '',
})
}
}
));
// 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 Framework Integration
bootstrap: new FormValidation.plugins.Bootstrap({
//eleInvalidClass: '',
eleValidClass: '',
})
}
}
));
// 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(),
// Validate fields when clicking the Submit button
// Bootstrap Framework Integration
bootstrap: new FormValidation.plugins.Bootstrap({
//eleInvalidClass: '',
eleValidClass: '',
})
}
}
));
}
return {
// public functions
init: function () {
_wizardEl = KTUtil.getById('kt_wizard_v3');
_formEl = KTUtil.getById('kt_form');
_initWizard();
_initValidation();
}
};
}();
jQuery(document).ready(function () {
KTWizard3.init();
});