diff --git a/app/assets/javascripts/controllers/auth_key_pair_cloud/auth_key_pair_cloud_controller.js b/app/assets/javascripts/controllers/auth_key_pair_cloud/auth_key_pair_cloud_controller.js index 2dea5fed030..8a8b59873a9 100644 --- a/app/assets/javascripts/controllers/auth_key_pair_cloud/auth_key_pair_cloud_controller.js +++ b/app/assets/javascripts/controllers/auth_key_pair_cloud/auth_key_pair_cloud_controller.js @@ -29,12 +29,11 @@ ManageIQ.angular.app.controller('keyPairCloudFormController', ['$http', '$scope' var url = '/auth_key_pair_cloud/create/' + keyPairFormId + '?button=' + buttonName; $scope.keyPairModel.ems_id = $scope.keyPairModel.ems.id; - if(serializeFields) { - miqService.miqAjaxButton(url, miqService.serializeModel($scope.keyPairModel)); + if (serializeFields) { + miqService.miqAjaxButton(url, miqService.serializeModel($scope.keyPairModel), { complete: false }); } else { - miqService.miqAjaxButton(url, false); + miqService.miqAjaxButton(url); } - miqService.sparkleOff(); }; $scope.cancelClicked = function() { @@ -69,4 +68,4 @@ ManageIQ.angular.app.controller('keyPairCloudFormController', ['$http', '$scope' } init(); -}]); \ No newline at end of file +}]); diff --git a/spec/javascripts/controllers/auth_key_pair_cloud/auth_key_pair_cloud_controller_spec.js b/spec/javascripts/controllers/auth_key_pair_cloud/auth_key_pair_cloud_controller_spec.js index f99c32176b9..6bcd768c7dd 100644 --- a/spec/javascripts/controllers/auth_key_pair_cloud/auth_key_pair_cloud_controller_spec.js +++ b/spec/javascripts/controllers/auth_key_pair_cloud/auth_key_pair_cloud_controller_spec.js @@ -69,7 +69,7 @@ describe('keyPairCloudFormController', function() { }); it('delegates to miqService.miqAjaxButton', function() { - expect(miqService.miqAjaxButton).toHaveBeenCalledWith('/auth_key_pair_cloud/create/new?button=save', miqService.serializeModel($scope.keyPairModel)); + expect(miqService.miqAjaxButton).toHaveBeenCalledWith('/auth_key_pair_cloud/create/new?button=save', miqService.serializeModel($scope.keyPairModel), { complete: false }); }); }); @@ -77,7 +77,7 @@ describe('keyPairCloudFormController', function() { beforeEach(function() { $httpBackend.flush(); $scope.angularForm = { - $setPristine: function (value){} + $setPristine: function (value) {}, }; $scope.cancelClicked(); }); @@ -87,7 +87,7 @@ describe('keyPairCloudFormController', function() { }); it('delegates to miqService.restAjaxButton', function() { - expect(miqService.miqAjaxButton).toHaveBeenCalledWith('/auth_key_pair_cloud/create/new?button=cancel', false); + expect(miqService.miqAjaxButton).toHaveBeenCalledWith('/auth_key_pair_cloud/create/new?button=cancel'); }); }); });