open terms of use as a modal

This commit is contained in:
Javier 2016-09-08 14:54:18 -03:00
commit ff44eb3879
3 changed files with 25 additions and 18 deletions

View file

@ -1,6 +1,14 @@
'use strict';
angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $state, $log, $ionicModal, profileService) {
angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, profileService) {
$scope.init = function() {
$scope.terms = {};
$scope.accept1 = $scope.accept2 = $scope.accept3 = false;
$timeout(function() {
$scope.$apply();
}, 1);
};
$scope.confirm = function() {
profileService.setDisclaimerAccepted(function(err) {
@ -11,14 +19,12 @@ angular.module('copayApp.controllers').controller('disclaimerController', functi
});
};
this.openModal = function() {
$ionicModal.fromTemplateUrl('views/modals/addressbook.html', {
$scope.openTermsModal = function() {
$ionicModal.fromTemplateUrl('views/modals/terms.html', {
scope: $scope
}).then(function(modal) {
$scope.addressbookModal = modal;
$scope.addressbookModal.show();
$scope.termsModal = modal;
$scope.termsModal.show();
});
};
});