Prevent double click/tap on button confirm

This commit is contained in:
Gustavo Maximiliano Cortez 2017-05-15 15:27:12 -03:00
parent 459c005a46
commit 6d5fb581a6
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
2 changed files with 13 additions and 11 deletions

View File

@ -48,17 +48,19 @@ angular.module('copayApp.controllers').controller('collectEmailController', func
};
$scope.save = function() {
var enabled = true; // Set enabled email: true
emailService.updateEmail({
enabled: enabled,
email: enabled ? $scope.data.email : null
});
if ($scope.data.accept) collectEmail();
$timeout(function() {
$scope.goNextView();
var enabled = true; // Set enabled email: true
emailService.updateEmail({
enabled: enabled,
email: enabled ? $scope.data.email : null
});
if ($scope.data.accept) collectEmail();
$timeout(function() {
$scope.goNextView();
}, 200);
}, 200);
};

View File

@ -28,7 +28,7 @@
</button>
</div>
<div class="col col-50">
<button class="button button-block button-stable" ng-click="save()">
<button class="button button-block button-stable" ng-disabled="disableButton" ng-click="save()">
{{'Confirm' | translate}}
</button>
</div>