21
21
*
22
22
* @param {string } title The wizard title displayed in the header
23
23
* @param {boolean= } hideIndicators Hides the step indicators in the header of the wizard
24
+ * @param {boolean= } activeStepTitleOnly Shows the title only for the active step in the step indicators, optional, default is false.
24
25
* @param {boolean= } hideSidebar Hides page navigation sidebar on the wizard pages
25
26
* @param {boolean= } hideHeader Optional value to hide the title bar. Default is false.
26
27
* @param {boolean= } hideBackButton Optional value to hide the back button, useful in 2 step wizards. Default is false.
68
69
</div>
69
70
<pf-wizard-substep step-title="Details - Extra" next-enabled="true" step-id="details-extra" step-priority="1" show-review="true" show-review-details="true" review-template="review-second-template.html">
70
71
<form class="form-horizontal">
71
- <pf-form-group pf-label="Lorem" required>
72
+ <pf-form-group pf-label="Lorem" pf-label-class="col-sm-3 col-md-2" pf-input-class="col-sm-9 col-md-10" required>
72
73
<input id="new-lorem" name="lorem" ng-model="data.lorem" type="text" required/>
73
74
</pf-form-group>
74
- <pf-form-group pf-label="Ipsum">
75
+ <pf-form-group pf-label="Ipsum" pf-label-class="col-sm-3 col-md-2" pf-input-class="col-sm-9 col-md-10" >
75
76
<input id="new-ipsum" name="ipsum" ng-model="data.ipsum" type="text" />
76
77
</pf-form-group>
77
78
</form>
80
81
<pf-wizard-step step-title="Second Step" substeps="false" step-id="configuration" step-priority="1" show-review="true" review-template="review-second-template.html" >
81
82
<form class="form-horizontal">
82
83
<h3>Wizards should make use of substeps consistently throughout (either using them or not using them). This is an example only.</h3>
83
- <pf-form-group pf-label="Lorem">
84
+ <pf-form-group pf-label="Lorem" pf-label-class="col-sm-3 col-md-2" pf-input-class="col-sm-9 col-md-10" >
84
85
<input id="new-lorem" name="lorem" ng-model="data.lorem" type="text"/>
85
86
</pf-form-group>
86
- <pf-form-group pf-label="Ipsum">
87
+ <pf-form-group pf-label="Ipsum" pf-label-class="col-sm-3 col-md-2" pf-input-class="col-sm-9 col-md-10" >
87
88
<input id="new-ipsum" name="ipsum" ng-model="data.ipsum" type="text" />
88
89
</pf-form-group>
89
90
</form>
98
99
<div ng-controller="DetailsGeneralController">
99
100
<pf-wizard-substep step-title="General" next-enabled="detailsGeneralComplete" step-id="details-general" step-priority="0" on-show="onShow" review-template="{{reviewTemplate}}" show-review-details="true">
100
101
<form class="form-horizontal">
101
- <pf-form-group pf-label="Name" required>
102
+ <pf-form-group pf-label="Name" pf-label-class="col-sm-3 col-md-2" pf-input-class="col-sm-9 col-md-10" required>
102
103
<input id="new-name" name="name" ng-model="data.name" type="text" ng-change="updateName()" required/>
103
104
</pf-form-group>
104
- <pf-form-group pf-label="Description">
105
+ <pf-form-group pf-label="Description" pf-label-class="col-sm-3 col-md-2" pf-input-class="col-sm-9 col-md-10" >
105
106
<input id="new-description" name="description" ng-model="data.description" type="text" />
106
107
</pf-form-group>
107
108
</form>
@@ -312,6 +313,7 @@ angular.module('patternfly.wizard').component('pfWizard', {
312
313
bindings : {
313
314
title : '@' ,
314
315
hideIndicators : '=?' ,
316
+ activeStepTitleOnly : '<?' ,
315
317
hideSidebar : '@' ,
316
318
hideHeader : '@' ,
317
319
hideBackButton : '@' ,
@@ -377,6 +379,7 @@ angular.module('patternfly.wizard').component('pfWizard', {
377
379
ctrl . hideHeader = ctrl . hideHeader === 'true' ;
378
380
ctrl . hideSidebar = ctrl . hideSidebar === 'true' ;
379
381
ctrl . hideBackButton = ctrl . hideBackButton === 'true' ;
382
+ ctrl . activeStepTitleOnly = ctrl . activeStepTitleOnly === true ;
380
383
381
384
// If a step class is given use it for all steps
382
385
if ( angular . isDefined ( ctrl . stepClass ) ) {
@@ -386,7 +389,7 @@ angular.module('patternfly.wizard').component('pfWizard', {
386
389
ctrl . sidebarClass = ctrl . stepClass ;
387
390
}
388
391
} else {
389
- // No step claass give, setup the content style to allow scrolling and a fixed height
392
+ // No step class give, setup the content style to allow scrolling and a fixed height
390
393
if ( angular . isUndefined ( ctrl . contentHeight ) ) {
391
394
ctrl . contentHeight = '300px' ;
392
395
}
@@ -595,7 +598,7 @@ angular.module('patternfly.wizard').component('pfWizard', {
595
598
// Check if callback is a function
596
599
if ( angular . isFunction ( callback ) ) {
597
600
if ( callback ( ctrl . selectedStep ) ) {
598
- if ( index <= enabledSteps . length - 1 ) {
601
+ if ( index < enabledSteps . length - 1 ) {
599
602
// Go to the next step
600
603
if ( enabledSteps [ index + 1 ] . substeps ) {
601
604
enabledSteps [ index + 1 ] . resetNav ( ) ;
0 commit comments