first initial
This commit is contained in:
172
public/assets/js/demo1/pages/wizard/wizard-1.js
Normal file
172
public/assets/js/demo1/pages/wizard/wizard-1.js
Normal file
@@ -0,0 +1,172 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTWizard1 = function () {
|
||||
// Base elements
|
||||
var wizardEl;
|
||||
var formEl;
|
||||
var validator;
|
||||
var wizard;
|
||||
|
||||
// Private functions
|
||||
var initWizard = function () {
|
||||
// Initialize form wizard
|
||||
wizard = new KTWizard('kt_wizard_v1', {
|
||||
startStep: 1
|
||||
});
|
||||
|
||||
// Validation before going to next page
|
||||
wizard.on('beforeNext', function(wizardObj) {
|
||||
if (validator.form() !== true) {
|
||||
wizardObj.stop(); // don't go to the next step
|
||||
}
|
||||
});
|
||||
|
||||
wizard.on('beforePrev', function(wizardObj) {
|
||||
if (validator.form() !== true) {
|
||||
wizardObj.stop(); // don't go to the next step
|
||||
}
|
||||
});
|
||||
|
||||
// Change event
|
||||
wizard.on('change', function(wizard) {
|
||||
setTimeout(function() {
|
||||
KTUtil.scrollTop();
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
|
||||
var initValidation = function() {
|
||||
validator = formEl.validate({
|
||||
// Validate only visible fields
|
||||
ignore: ":hidden",
|
||||
|
||||
// Validation rules
|
||||
rules: {
|
||||
//= Step 1
|
||||
address1: {
|
||||
required: true
|
||||
},
|
||||
postcode: {
|
||||
required: true
|
||||
},
|
||||
city: {
|
||||
required: true
|
||||
},
|
||||
state: {
|
||||
required: true
|
||||
},
|
||||
country: {
|
||||
required: true
|
||||
},
|
||||
|
||||
//= Step 2
|
||||
package: {
|
||||
required: true
|
||||
},
|
||||
weight: {
|
||||
required: true
|
||||
},
|
||||
width: {
|
||||
required: true
|
||||
},
|
||||
height: {
|
||||
required: true
|
||||
},
|
||||
length: {
|
||||
required: true
|
||||
},
|
||||
|
||||
//= Step 3
|
||||
delivery: {
|
||||
required: true
|
||||
},
|
||||
packaging: {
|
||||
required: true
|
||||
},
|
||||
preferreddelivery: {
|
||||
required: true
|
||||
},
|
||||
|
||||
//= Step 4
|
||||
locaddress1: {
|
||||
required: true
|
||||
},
|
||||
locpostcode: {
|
||||
required: true
|
||||
},
|
||||
loccity: {
|
||||
required: true
|
||||
},
|
||||
locstate: {
|
||||
required: true
|
||||
},
|
||||
loccountry: {
|
||||
required: true
|
||||
},
|
||||
},
|
||||
|
||||
// Display error
|
||||
invalidHandler: function(event, validator) {
|
||||
KTUtil.scrollTop();
|
||||
|
||||
swal.fire({
|
||||
"title": "",
|
||||
"text": "There are some errors in your submission. Please correct them.",
|
||||
"type": "error",
|
||||
"confirmButtonClass": "btn btn-secondary"
|
||||
});
|
||||
},
|
||||
|
||||
// Submit valid form
|
||||
submitHandler: function (form) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var initSubmit = function() {
|
||||
var btn = formEl.find('[data-ktwizard-type="action-submit"]');
|
||||
|
||||
btn.on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (validator.form()) {
|
||||
// See: src\js\framework\base\app.js
|
||||
KTApp.progress(btn);
|
||||
//KTApp.block(formEl);
|
||||
|
||||
// See: http://malsup.com/jquery/form/#ajaxSubmit
|
||||
formEl.ajaxSubmit({
|
||||
success: function() {
|
||||
KTApp.unprogress(btn);
|
||||
//KTApp.unblock(formEl);
|
||||
|
||||
swal.fire({
|
||||
"title": "",
|
||||
"text": "The application has been successfully submitted!",
|
||||
"type": "success",
|
||||
"confirmButtonClass": "btn btn-secondary"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// public functions
|
||||
init: function() {
|
||||
wizardEl = KTUtil.get('kt_wizard_v1');
|
||||
formEl = $('#kt_form');
|
||||
|
||||
initWizard();
|
||||
initValidation();
|
||||
initSubmit();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTWizard1.init();
|
||||
});
|
||||
1
public/assets/js/demo1/pages/wizard/wizard-1.min.js
vendored
Normal file
1
public/assets/js/demo1/pages/wizard/wizard-1.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTWizard1=function(){var e,r,t;return{init:function(){var i;KTUtil.get("kt_wizard_v1"),e=$("#kt_form"),(t=new KTWizard("kt_wizard_v1",{startStep:1})).on("beforeNext",function(e){!0!==r.form()&&e.stop()}),t.on("beforePrev",function(e){!0!==r.form()&&e.stop()}),t.on("change",function(e){setTimeout(function(){KTUtil.scrollTop()},500)}),r=e.validate({ignore:":hidden",rules:{address1:{required:!0},postcode:{required:!0},city:{required:!0},state:{required:!0},country:{required:!0},package:{required:!0},weight:{required:!0},width:{required:!0},height:{required:!0},length:{required:!0},delivery:{required:!0},packaging:{required:!0},preferreddelivery:{required:!0},locaddress1:{required:!0},locpostcode:{required:!0},loccity:{required:!0},locstate:{required:!0},loccountry:{required:!0}},invalidHandler:function(e,r){KTUtil.scrollTop(),swal.fire({title:"",text:"There are some errors in your submission. Please correct them.",type:"error",confirmButtonClass:"btn btn-secondary"})},submitHandler:function(e){}}),(i=e.find('[data-ktwizard-type="action-submit"]')).on("click",function(t){t.preventDefault(),r.form()&&(KTApp.progress(i),e.ajaxSubmit({success:function(){KTApp.unprogress(i),swal.fire({title:"",text:"The application has been successfully submitted!",type:"success",confirmButtonClass:"btn btn-secondary"})}}))})}}}();jQuery(document).ready(function(){KTWizard1.init()});
|
||||
188
public/assets/js/demo1/pages/wizard/wizard-2.js
Normal file
188
public/assets/js/demo1/pages/wizard/wizard-2.js
Normal file
@@ -0,0 +1,188 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTWizard2 = function () {
|
||||
// Base elements
|
||||
var wizardEl;
|
||||
var formEl;
|
||||
var validator;
|
||||
var wizard;
|
||||
|
||||
// Private functions
|
||||
var initWizard = function () {
|
||||
// Initialize form wizard
|
||||
wizard = new KTWizard('kt_wizard_v2', {
|
||||
startStep: 1,
|
||||
});
|
||||
|
||||
// Validation before going to next page
|
||||
wizard.on('beforeNext', function(wizardObj) {
|
||||
if (validator.form() !== true) {
|
||||
wizardObj.stop(); // don't go to the next step
|
||||
}
|
||||
});
|
||||
|
||||
wizard.on('beforePrev', function(wizardObj) {
|
||||
if (validator.form() !== true) {
|
||||
wizardObj.stop(); // don't go to the next step
|
||||
}
|
||||
});
|
||||
|
||||
// Change event
|
||||
wizard.on('change', function(wizard) {
|
||||
KTUtil.scrollTop();
|
||||
});
|
||||
}
|
||||
|
||||
var initValidation = function() {
|
||||
validator = formEl.validate({
|
||||
// Validate only visible fields
|
||||
ignore: ":hidden",
|
||||
|
||||
// Validation rules
|
||||
rules: {
|
||||
//= Step 1
|
||||
fname: {
|
||||
required: true
|
||||
},
|
||||
lname: {
|
||||
required: true
|
||||
},
|
||||
phone: {
|
||||
required: true
|
||||
},
|
||||
emaul: {
|
||||
required: true,
|
||||
email: true
|
||||
},
|
||||
|
||||
//= Step 2
|
||||
address1: {
|
||||
required: true
|
||||
},
|
||||
postcode: {
|
||||
required: true
|
||||
},
|
||||
city: {
|
||||
required: true
|
||||
},
|
||||
state: {
|
||||
required: true
|
||||
},
|
||||
country: {
|
||||
required: true
|
||||
},
|
||||
|
||||
//= Step 3
|
||||
delivery: {
|
||||
required: true
|
||||
},
|
||||
packaging: {
|
||||
required: true
|
||||
},
|
||||
preferreddelivery: {
|
||||
required: true
|
||||
},
|
||||
|
||||
//= Step 4
|
||||
locaddress1: {
|
||||
required: true
|
||||
},
|
||||
locpostcode: {
|
||||
required: true
|
||||
},
|
||||
loccity: {
|
||||
required: true
|
||||
},
|
||||
locstate: {
|
||||
required: true
|
||||
},
|
||||
loccountry: {
|
||||
required: true
|
||||
},
|
||||
|
||||
//= Step 5
|
||||
ccname: {
|
||||
required: true
|
||||
},
|
||||
ccnumber: {
|
||||
required: true,
|
||||
creditcard: true
|
||||
},
|
||||
ccmonth: {
|
||||
required: true
|
||||
},
|
||||
ccyear: {
|
||||
required: true
|
||||
},
|
||||
cccvv: {
|
||||
required: true,
|
||||
minlength: 2,
|
||||
maxlength: 3
|
||||
},
|
||||
},
|
||||
|
||||
// Display error
|
||||
invalidHandler: function(event, validator) {
|
||||
KTUtil.scrollTop();
|
||||
|
||||
swal.fire({
|
||||
"title": "",
|
||||
"text": "There are some errors in your submission. Please correct them.",
|
||||
"type": "error",
|
||||
"confirmButtonClass": "btn btn-secondary"
|
||||
});
|
||||
},
|
||||
|
||||
// Submit valid form
|
||||
submitHandler: function (form) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var initSubmit = function() {
|
||||
var btn = formEl.find('[data-ktwizard-type="action-submit"]');
|
||||
|
||||
btn.on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (validator.form()) {
|
||||
// See: src\js\framework\base\app.js
|
||||
KTApp.progress(btn);
|
||||
//KTApp.block(formEl);
|
||||
|
||||
// See: http://malsup.com/jquery/form/#ajaxSubmit
|
||||
formEl.ajaxSubmit({
|
||||
success: function() {
|
||||
KTApp.unprogress(btn);
|
||||
//KTApp.unblock(formEl);
|
||||
|
||||
swal.fire({
|
||||
"title": "",
|
||||
"text": "The application has been successfully submitted!",
|
||||
"type": "success",
|
||||
"confirmButtonClass": "btn btn-secondary"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// public functions
|
||||
init: function() {
|
||||
wizardEl = KTUtil.get('kt_wizard_v2');
|
||||
formEl = $('#kt_form');
|
||||
|
||||
initWizard();
|
||||
initValidation();
|
||||
initSubmit();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTWizard2.init();
|
||||
});
|
||||
1
public/assets/js/demo1/pages/wizard/wizard-2.min.js
vendored
Normal file
1
public/assets/js/demo1/pages/wizard/wizard-2.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTWizard2=function(){var e,r,i;return{init:function(){var t;KTUtil.get("kt_wizard_v2"),e=$("#kt_form"),(i=new KTWizard("kt_wizard_v2",{startStep:1})).on("beforeNext",function(e){!0!==r.form()&&e.stop()}),i.on("beforePrev",function(e){!0!==r.form()&&e.stop()}),i.on("change",function(e){KTUtil.scrollTop()}),r=e.validate({ignore:":hidden",rules:{fname:{required:!0},lname:{required:!0},phone:{required:!0},emaul:{required:!0,email:!0},address1:{required:!0},postcode:{required:!0},city:{required:!0},state:{required:!0},country:{required:!0},delivery:{required:!0},packaging:{required:!0},preferreddelivery:{required:!0},locaddress1:{required:!0},locpostcode:{required:!0},loccity:{required:!0},locstate:{required:!0},loccountry:{required:!0},ccname:{required:!0},ccnumber:{required:!0,creditcard:!0},ccmonth:{required:!0},ccyear:{required:!0},cccvv:{required:!0,minlength:2,maxlength:3}},invalidHandler:function(e,r){KTUtil.scrollTop(),swal.fire({title:"",text:"There are some errors in your submission. Please correct them.",type:"error",confirmButtonClass:"btn btn-secondary"})},submitHandler:function(e){}}),(t=e.find('[data-ktwizard-type="action-submit"]')).on("click",function(i){i.preventDefault(),r.form()&&(KTApp.progress(t),e.ajaxSubmit({success:function(){KTApp.unprogress(t),swal.fire({title:"",text:"The application has been successfully submitted!",type:"success",confirmButtonClass:"btn btn-secondary"})}}))})}}}();jQuery(document).ready(function(){KTWizard2.init()});
|
||||
170
public/assets/js/demo1/pages/wizard/wizard-3.js
Normal file
170
public/assets/js/demo1/pages/wizard/wizard-3.js
Normal file
@@ -0,0 +1,170 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTWizard3 = function () {
|
||||
// Base elements
|
||||
var wizardEl;
|
||||
var formEl;
|
||||
var validator;
|
||||
var wizard;
|
||||
|
||||
// Private functions
|
||||
var initWizard = function () {
|
||||
// Initialize form wizard
|
||||
wizard = new KTWizard('kt_wizard_v3', {
|
||||
startStep: 1,
|
||||
});
|
||||
|
||||
// Validation before going to next page
|
||||
wizard.on('beforeNext', function(wizardObj) {
|
||||
if (validator.form() !== true) {
|
||||
wizardObj.stop(); // don't go to the next step
|
||||
}
|
||||
});
|
||||
|
||||
wizard.on('beforePrev', function(wizardObj) {
|
||||
if (validator.form() !== true) {
|
||||
wizardObj.stop(); // don't go to the next step
|
||||
}
|
||||
});
|
||||
|
||||
// Change event
|
||||
wizard.on('change', function(wizard) {
|
||||
KTUtil.scrollTop();
|
||||
});
|
||||
}
|
||||
|
||||
var initValidation = function() {
|
||||
validator = formEl.validate({
|
||||
// Validate only visible fields
|
||||
ignore: ":hidden",
|
||||
|
||||
// Validation rules
|
||||
rules: {
|
||||
//= Step 1
|
||||
address1: {
|
||||
required: true
|
||||
},
|
||||
postcode: {
|
||||
required: true
|
||||
},
|
||||
city: {
|
||||
required: true
|
||||
},
|
||||
state: {
|
||||
required: true
|
||||
},
|
||||
country: {
|
||||
required: true
|
||||
},
|
||||
|
||||
//= Step 2
|
||||
package: {
|
||||
required: true
|
||||
},
|
||||
weight: {
|
||||
required: true
|
||||
},
|
||||
width: {
|
||||
required: true
|
||||
},
|
||||
height: {
|
||||
required: true
|
||||
},
|
||||
length: {
|
||||
required: true
|
||||
},
|
||||
|
||||
//= Step 3
|
||||
delivery: {
|
||||
required: true
|
||||
},
|
||||
packaging: {
|
||||
required: true
|
||||
},
|
||||
preferreddelivery: {
|
||||
required: true
|
||||
},
|
||||
|
||||
//= Step 4
|
||||
locaddress1: {
|
||||
required: true
|
||||
},
|
||||
locpostcode: {
|
||||
required: true
|
||||
},
|
||||
loccity: {
|
||||
required: true
|
||||
},
|
||||
locstate: {
|
||||
required: true
|
||||
},
|
||||
loccountry: {
|
||||
required: true
|
||||
},
|
||||
},
|
||||
|
||||
// Display error
|
||||
invalidHandler: function(event, validator) {
|
||||
KTUtil.scrollTop();
|
||||
|
||||
swal.fire({
|
||||
"title": "",
|
||||
"text": "There are some errors in your submission. Please correct them.",
|
||||
"type": "error",
|
||||
"confirmButtonClass": "btn btn-secondary"
|
||||
});
|
||||
},
|
||||
|
||||
// Submit valid form
|
||||
submitHandler: function (form) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var initSubmit = function() {
|
||||
var btn = formEl.find('[data-ktwizard-type="action-submit"]');
|
||||
|
||||
btn.on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (validator.form()) {
|
||||
// See: src\js\framework\base\app.js
|
||||
KTApp.progress(btn);
|
||||
//KTApp.block(formEl);
|
||||
|
||||
// See: http://malsup.com/jquery/form/#ajaxSubmit
|
||||
formEl.ajaxSubmit({
|
||||
success: function() {
|
||||
KTApp.unprogress(btn);
|
||||
//KTApp.unblock(formEl);
|
||||
|
||||
swal.fire({
|
||||
"title": "",
|
||||
"text": "The application has been successfully submitted!",
|
||||
"type": "success",
|
||||
"confirmButtonClass": "btn btn-secondary"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// public functions
|
||||
init: function() {
|
||||
wizardEl = KTUtil.get('kt_wizard_v3');
|
||||
formEl = $('#kt_form');
|
||||
|
||||
initWizard();
|
||||
initValidation();
|
||||
initSubmit();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTWizard3.init();
|
||||
});
|
||||
1
public/assets/js/demo1/pages/wizard/wizard-3.min.js
vendored
Normal file
1
public/assets/js/demo1/pages/wizard/wizard-3.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTWizard3=function(){var e,r,t;return{init:function(){var i;KTUtil.get("kt_wizard_v3"),e=$("#kt_form"),(t=new KTWizard("kt_wizard_v3",{startStep:1})).on("beforeNext",function(e){!0!==r.form()&&e.stop()}),t.on("beforePrev",function(e){!0!==r.form()&&e.stop()}),t.on("change",function(e){KTUtil.scrollTop()}),r=e.validate({ignore:":hidden",rules:{address1:{required:!0},postcode:{required:!0},city:{required:!0},state:{required:!0},country:{required:!0},package:{required:!0},weight:{required:!0},width:{required:!0},height:{required:!0},length:{required:!0},delivery:{required:!0},packaging:{required:!0},preferreddelivery:{required:!0},locaddress1:{required:!0},locpostcode:{required:!0},loccity:{required:!0},locstate:{required:!0},loccountry:{required:!0}},invalidHandler:function(e,r){KTUtil.scrollTop(),swal.fire({title:"",text:"There are some errors in your submission. Please correct them.",type:"error",confirmButtonClass:"btn btn-secondary"})},submitHandler:function(e){}}),(i=e.find('[data-ktwizard-type="action-submit"]')).on("click",function(t){t.preventDefault(),r.form()&&(KTApp.progress(i),e.ajaxSubmit({success:function(){KTApp.unprogress(i),swal.fire({title:"",text:"The application has been successfully submitted!",type:"success",confirmButtonClass:"btn btn-secondary"})}}))})}}}();jQuery(document).ready(function(){KTWizard3.init()});
|
||||
160
public/assets/js/demo1/pages/wizard/wizard-4.js
Normal file
160
public/assets/js/demo1/pages/wizard/wizard-4.js
Normal file
@@ -0,0 +1,160 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTWizard4 = function () {
|
||||
// Base elements
|
||||
var wizardEl;
|
||||
var formEl;
|
||||
var validator;
|
||||
var wizard;
|
||||
|
||||
// Private functions
|
||||
var initWizard = function () {
|
||||
// Initialize form wizard
|
||||
wizard = new KTWizard('kt_wizard_v4', {
|
||||
startStep: 1,
|
||||
});
|
||||
|
||||
// Validation before going to next page
|
||||
wizard.on('beforeNext', function(wizardObj) {
|
||||
if (validator.form() !== true) {
|
||||
wizardObj.stop(); // don't go to the next step
|
||||
}
|
||||
});
|
||||
|
||||
wizard.on('beforePrev', function(wizardObj) {
|
||||
if (validator.form() !== true) {
|
||||
wizardObj.stop(); // don't go to the next step
|
||||
}
|
||||
});
|
||||
|
||||
// Change event
|
||||
wizard.on('change', function(wizard) {
|
||||
KTUtil.scrollTop();
|
||||
});
|
||||
}
|
||||
|
||||
var initValidation = function() {
|
||||
validator = formEl.validate({
|
||||
// Validate only visible fields
|
||||
ignore: ":hidden",
|
||||
|
||||
// Validation rules
|
||||
rules: {
|
||||
//= Step 1
|
||||
fname: {
|
||||
required: true
|
||||
},
|
||||
lname: {
|
||||
required: true
|
||||
},
|
||||
phone: {
|
||||
required: true
|
||||
},
|
||||
emaul: {
|
||||
required: true,
|
||||
email: true
|
||||
},
|
||||
|
||||
//= Step 2
|
||||
address1: {
|
||||
required: true
|
||||
},
|
||||
postcode: {
|
||||
required: true
|
||||
},
|
||||
city: {
|
||||
required: true
|
||||
},
|
||||
state: {
|
||||
required: true
|
||||
},
|
||||
country: {
|
||||
required: true
|
||||
},
|
||||
|
||||
//= Step 3
|
||||
ccname: {
|
||||
required: true
|
||||
},
|
||||
ccnumber: {
|
||||
required: true,
|
||||
creditcard: true
|
||||
},
|
||||
ccmonth: {
|
||||
required: true
|
||||
},
|
||||
ccyear: {
|
||||
required: true
|
||||
},
|
||||
cccvv: {
|
||||
required: true,
|
||||
minlength: 2,
|
||||
maxlength: 3
|
||||
},
|
||||
},
|
||||
|
||||
// Display error
|
||||
invalidHandler: function(event, validator) {
|
||||
KTUtil.scrollTop();
|
||||
|
||||
swal.fire({
|
||||
"title": "",
|
||||
"text": "There are some errors in your submission. Please correct them.",
|
||||
"type": "error",
|
||||
"confirmButtonClass": "btn btn-secondary"
|
||||
});
|
||||
},
|
||||
|
||||
// Submit valid form
|
||||
submitHandler: function (form) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var initSubmit = function() {
|
||||
var btn = formEl.find('[data-ktwizard-type="action-submit"]');
|
||||
|
||||
btn.on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (validator.form()) {
|
||||
// See: src\js\framework\base\app.js
|
||||
KTApp.progress(btn);
|
||||
//KTApp.block(formEl);
|
||||
|
||||
// See: http://malsup.com/jquery/form/#ajaxSubmit
|
||||
formEl.ajaxSubmit({
|
||||
success: function() {
|
||||
KTApp.unprogress(btn);
|
||||
//KTApp.unblock(formEl);
|
||||
|
||||
swal.fire({
|
||||
"title": "",
|
||||
"text": "The application has been successfully submitted!",
|
||||
"type": "success",
|
||||
"confirmButtonClass": "btn btn-secondary"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// public functions
|
||||
init: function() {
|
||||
wizardEl = KTUtil.get('kt_wizard_v4');
|
||||
formEl = $('#kt_form');
|
||||
|
||||
initWizard();
|
||||
initValidation();
|
||||
initSubmit();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTWizard4.init();
|
||||
});
|
||||
1
public/assets/js/demo1/pages/wizard/wizard-4.min.js
vendored
Normal file
1
public/assets/js/demo1/pages/wizard/wizard-4.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTWizard4=function(){var e,r,t;return{init:function(){var i;KTUtil.get("kt_wizard_v4"),e=$("#kt_form"),(t=new KTWizard("kt_wizard_v4",{startStep:1})).on("beforeNext",function(e){!0!==r.form()&&e.stop()}),t.on("beforePrev",function(e){!0!==r.form()&&e.stop()}),t.on("change",function(e){KTUtil.scrollTop()}),r=e.validate({ignore:":hidden",rules:{fname:{required:!0},lname:{required:!0},phone:{required:!0},emaul:{required:!0,email:!0},address1:{required:!0},postcode:{required:!0},city:{required:!0},state:{required:!0},country:{required:!0},ccname:{required:!0},ccnumber:{required:!0,creditcard:!0},ccmonth:{required:!0},ccyear:{required:!0},cccvv:{required:!0,minlength:2,maxlength:3}},invalidHandler:function(e,r){KTUtil.scrollTop(),swal.fire({title:"",text:"There are some errors in your submission. Please correct them.",type:"error",confirmButtonClass:"btn btn-secondary"})},submitHandler:function(e){}}),(i=e.find('[data-ktwizard-type="action-submit"]')).on("click",function(t){t.preventDefault(),r.form()&&(KTApp.progress(i),e.ajaxSubmit({success:function(){KTApp.unprogress(i),swal.fire({title:"",text:"The application has been successfully submitted!",type:"success",confirmButtonClass:"btn btn-secondary"})}}))})}}}();jQuery(document).ready(function(){KTWizard4.init()});
|
||||
Reference in New Issue
Block a user