diff --git a/public/Importer/purchaseorder2.html b/public/Importer/purchaseorder2.html index 165a036..ef0ea94 100644 --- a/public/Importer/purchaseorder2.html +++ b/public/Importer/purchaseorder2.html @@ -270,7 +270,7 @@
- @@ -668,7 +668,7 @@ }); $.fn.select2.defaults.set("theme", "bootstrap"); - $(".qweqweqweqwe").select2({ + $(".qweqweqwe").select2({ placeholder: "Select a Forwarder", escapeMarkup: function(markup) { return markup; diff --git a/public/Importer/shippingorder.html b/public/Importer/shippingorder.html index 1e7c6b1..888b99a 100644 --- a/public/Importer/shippingorder.html +++ b/public/Importer/shippingorder.html @@ -332,7 +332,7 @@ License: You must have a valid license purchased only from themeforest(the above
- @@ -709,7 +709,7 @@ License: You must have a valid license purchased only from themeforest(the above - + diff --git a/public/assets/pages/scripts/form-wizard.js b/public/assets/pages/scripts/form-wizard.js index ae3eec2..e1614cb 100644 --- a/public/assets/pages/scripts/form-wizard.js +++ b/public/assets/pages/scripts/form-wizard.js @@ -197,6 +197,22 @@ var FormWizard = function () { $('#form_wizard_1').find('.button-next').show(); $('#form_wizard_1').find('.button-submit').hide(); } + + + if (current == 1) { + $('#form_wizard_2').find('.button-previous').hide(); + } else { + $('#form_wizard_2').find('.button-previous').show(); + } + + if (current >= total) { + $('#form_wizard_2').find('.button-next').hide(); + $('#form_wizard_2').find('.button-submit').show(); + displayConfirm(); + } else { + $('#form_wizard_2').find('.button-next').show(); + $('#form_wizard_2').find('.button-submit').hide(); + } App.scrollTo($('.page-title')); } @@ -241,10 +257,55 @@ var FormWizard = function () { } }); + $('#form_wizard_2').bootstrapWizard({ + 'nextSelector': '.button-next', + 'previousSelector': '.button-previous', + onTabClick: function (tab, navigation, index, clickedIndex) { + return false; + + success.hide(); + error.hide(); + if (form.valid() == false) { + return false; + } + + handleTitle(tab, navigation, clickedIndex); + }, + onNext: function (tab, navigation, index) { + success.hide(); + error.hide(); + + if (form.valid() == false) { + return false; + } + + handleTitle(tab, navigation, index); + }, + onPrevious: function (tab, navigation, index) { + success.hide(); + error.hide(); + + handleTitle(tab, navigation, index); + }, + onTabShow: function (tab, navigation, index) { + var total = navigation.find('li').length; + var current = index + 1; + var $percent = (current / total) * 100; + $('#form_wizard_2').find('.progress-bar').css({ + width: $percent + '%' + }); + } + }); + $('#form_wizard_1').find('.button-previous').hide(); $('#form_wizard_1 .button-submit').click(function () { }).hide(); + + $('#form_wizard_2').find('.button-previous').hide(); + $('#form_wizard_2 .button-submit').click(function () { + }).hide(); + //apply validation on select2 dropdown value change, this only needed for chosen dropdown integration. $('#country_list', form).change(function () { form.validate().element($(this)); //revalidate the chosen dropdown value and show error or success message for the input