@@ -387,11 +387,11 @@ define([
387
387
388
388
if ( this . checkForNewAttributes ( ) ) {
389
389
this . formSaveParams = arguments ;
390
- this . attributeSetHandlerModal ( ) . openModal ( ) . then ( _ . bind ( this . unserializeData , this ) ) ;
390
+ this . attributeSetHandlerModal ( ) . openModal ( ) ;
391
391
} else {
392
392
this . formElement ( ) . save ( arguments [ 0 ] , arguments [ 1 ] ) ;
393
393
394
- if ( this . source . params . invalid ) {
394
+ if ( this . formElement ( ) . source . get ( ' params.invalid' ) ) {
395
395
this . unserializeData ( ) ;
396
396
}
397
397
}
@@ -466,20 +466,20 @@ define([
466
466
* @returns {Boolean }
467
467
*/
468
468
addNewAttributeSetHandler : function ( ) {
469
- var choosenAttributeSetOption ;
469
+ var chosenAttributeSetOption ;
470
470
471
471
this . formElement ( ) . validate ( ) ;
472
472
473
473
if ( this . formElement ( ) . source . get ( 'params.invalid' ) === false ) {
474
- choosenAttributeSetOption = this . attributeSetSelection ;
474
+ chosenAttributeSetOption = this . attributeSetSelection ;
475
475
476
- if ( choosenAttributeSetOption === 'new' ) {
476
+ if ( chosenAttributeSetOption === 'new' ) {
477
477
this . createNewAttributeSet ( ) ;
478
478
479
479
return false ;
480
480
}
481
481
482
- if ( choosenAttributeSetOption === 'existing' ) {
482
+ if ( chosenAttributeSetOption === 'existing' ) {
483
483
this . set (
484
484
'skeletonAttributeSet' ,
485
485
this . attributeSetId
@@ -489,6 +489,9 @@ define([
489
489
this . closeDialogAndProcessForm ( ) ;
490
490
491
491
return true ;
492
+ } else {
493
+ this . unserializeData ( ) ;
494
+ return false ;
492
495
}
493
496
} ,
494
497
0 commit comments