@@ -263,7 +263,26 @@ export default class Wizard extends Webform {
263
263
}
264
264
265
265
build ( ) {
266
- super . build ( ) ;
266
+ // Clear any existing event handlers in case this is a rebuild
267
+ this . eventHandlers . forEach ( h => this . removeEventListener ( h . obj , h . type ) ) ;
268
+
269
+ const element = this . getContainer ( ) ;
270
+ const componentsContainer = this . ce ( 'div' , {
271
+ class : 'wizard-body'
272
+ } ) ;
273
+ element . appendChild ( componentsContainer ) ;
274
+
275
+ this . on ( 'submitButton' , ( options ) => this . submit ( false , options ) , true ) ;
276
+ this . on ( 'checkValidity' , ( data ) => this . checkValidity ( null , true , data ) , true ) ;
277
+ this . addComponents ( componentsContainer , null , null ) ;
278
+ this . currentForm = this ;
279
+ this . on ( 'requestUrl' , ( args ) => ( this . submitUrl ( args . url , args . headers ) ) , true ) ;
280
+ setTimeout ( ( ) => {
281
+ this . onChange ( {
282
+ noEmit : true
283
+ } ) ;
284
+ } , 1 ) ;
285
+
267
286
this . formReady . then ( ( ) => {
268
287
this . buildWizardHeader ( ) ;
269
288
this . buildWizardNav ( ) ;
@@ -328,6 +347,7 @@ export default class Wizard extends Webform {
328
347
} ) ;
329
348
330
349
this . wizardHeader = this . ce ( 'nav' , {
350
+ class : 'wizard-header' ,
331
351
'aria-label' : 'navigation'
332
352
} ) ;
333
353
@@ -454,7 +474,7 @@ export default class Wizard extends Webform {
454
474
return ;
455
475
}
456
476
this . wizardNav = this . ce ( 'ul' , {
457
- class : 'list-inline pull-right'
477
+ class : 'list-inline pull-right wizard-footer '
458
478
} ) ;
459
479
this . element . appendChild ( this . wizardNav ) ;
460
480
[
0 commit comments