finish button not disabled when click on previous button in last step to previous one
LakshmanKatragadda opened this issue · comments
I have the same problem!
I had the same problem when i had noForwardJumping property enabled. I resolved it moving method _adjustButton($this) from the line 279 to after line 292 into file query.smartWizard.js.
I think the problem was that method enableFinish check this
"!this.steps.hasClass('disabled')" but _adjustButton($this) method is called before disable
needed steps
So te correct way is call _adjustButton($this) at the end of _setupStep function :
if($.isFunction($this.options.onShowStep)) {
var context = { fromStep: parseInt($(curStep).attr('rel')), toStep: parseInt($(selStep).attr('rel')) };
if(!
return false;
}
}
if ($this.options.noForwardJumping) {
// +2 == +1 (for index to step num) +1 (for next step)
for (var i = $this.curStepIdx + 2; i <= $this.steps.length; i++) {
$this.disableStep(i);
}
}
_adjustButton($this);