diff --git a/src/bootstrap-wizard.js b/src/bootstrap-wizard.js index ec7eed0..a5a90d9 100644 --- a/src/bootstrap-wizard.js +++ b/src/bootstrap-wizard.js @@ -886,6 +886,8 @@ this.updateProgressBar(this.percentComplete); } + this.showButtons(); + return newCard; } else { @@ -921,6 +923,12 @@ return this; }, + unlockCards: function() { + this.log("unlocking nav cards"); + this.eachCard(function(i,card){card.markVisited();}); + return this; + }, + disableCards: function() { this.log("disabling all nav cards"); this.eachCard(function(i,card){card.disable();}); @@ -1089,6 +1097,13 @@ this._submitting = false; this.showSubmitCard("failure"); this.trigger("submitFailure"); + + // Unlock the cards, and reset the buttons, to allow the user to retry + this.unlockCards(); + this.nextButton.hide(); + this.enableNextButton(); + this._readyToSubmit = true; + this.trigger("readySubmit"); }, submitError: function() { @@ -1096,6 +1111,13 @@ this._submitting = false; this.showSubmitCard("error"); this.trigger("submitError"); + + // Unlock the cards, and reset the buttons, to allow the user to retry + this.unlockCards(); + this.nextButton.hide(); + this.enableNextButton(); + this._readyToSubmit = true; + this.trigger("readySubmit"); },