added conditional to show back button when no backup has been saved

This commit is contained in:
Jamal Jackson 2016-09-29 14:50:33 -04:00
commit 7f813ba396
5 changed files with 29 additions and 32 deletions

View file

@ -18,7 +18,7 @@ angular.module('copayApp.controllers').controller('backupRequestController', fun
var cancelText = gettextCatalog.getString('Go back');
popupService.showConfirm(title, message, okText, cancelText, function(val) {
if (val) {
$state.go('onboarding.disclaimer');
$state.go('onboarding.disclaimer', {backedUp: false});
}
});
}

View file

@ -1,11 +1,11 @@
'use strict';
angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, profileService, uxLanguage, externalLinkService) {
angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, profileService, uxLanguage, externalLinkService, storageService, $stateParams) {
$scope.init = function() {
$scope.lang = uxLanguage.currentLanguage;
$scope.terms = {};
$scope.accept1 = $scope.accept2 = $scope.accept3 = false;
$scope.backedUp = $stateParams.backedUp;
$timeout(function() {
$scope.$apply();
}, 1);
@ -34,4 +34,10 @@ angular.module('copayApp.controllers').controller('disclaimerController', functi
$scope.termsModal.show();
});
};
$scope.goBack = function(){
$state.go('onboarding.backupRequest');
}
});