Skip to content

Commit

Permalink
fix(wizard.html): improve back and next button behavior
Browse files Browse the repository at this point in the history
fix #1044
  • Loading branch information
mcoker committed May 15, 2018
1 parent f7518fa commit f06c99f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/pages/_includes/widgets/communication/wizard.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ <h3 class="blank-slate-pf-main-action">Loading Wizard</h3>
<form class="form-horizontal">
<!-- replacing id with data-id to pass build errors -->
<div class="form-group required">
<label class="col-sm-2 control-label" for="textInput-markup" required>Name</label>
<label class="col-sm-2 control-label required-pf" for="textInput-markup" required>Name</label>
<div class="col-sm-10">
<input id="detailsName" type="text" data-id="textInput-markup" class="form-control">
</div>
Expand Down Expand Up @@ -474,6 +474,8 @@ <h3 class="blank-slate-pf-main-action">Deployment was successful</h3>
this.updateBackBtnDisplay = function() {
if (self.currentTab == self.tabs[0]) {
$(self.modal + " .wizard-pf-back").addClass("disabled");
} else {
$(self.modal + " .wizard-pf-back").removeClass("disabled");
}
};

Expand Down Expand Up @@ -561,7 +563,7 @@ <h3 class="blank-slate-pf-main-action">Deployment was successful</h3>
};
// Back button clicked
this.backBtnClicked = function() {
$(self.modal + " .wizard-pf-back").click(function() {
$('body').on('click', self.modal + " .wizard-pf-back:not(.disabled)", function() {
// if not the first page
if (self.currentTab != self.tabs[0]) {
// go back a page (i.e. -1)
Expand All @@ -574,7 +576,7 @@ <h3 class="blank-slate-pf-main-action">Deployment was successful</h3>

// Next button clicked
this.nextBtnClicked = function() {
$(self.modal + " .wizard-pf-next").click(function() {
$('body').on('click', self.modal + " .wizard-pf-next:not(.disabled)", function() {
// go forward a page (i.e. +1)
self.wizardPaging(1);
// show/hide/disable/enable buttons if needed
Expand Down

0 comments on commit f06c99f

Please sign in to comment.