From ff44eb3879d59ef65afff77df81e37d70741a4fa Mon Sep 17 00:00:00 2001 From: Javier Date: Thu, 8 Sep 2016 14:54:18 -0300 Subject: [PATCH] open terms of use as a modal --- .../views/{onboarding => modals}/terms.html | 14 ++++++------- public/views/onboarding/disclaimer.html | 9 +++++---- src/js/controllers/onboarding/disclaimer.js | 20 ++++++++++++------- 3 files changed, 25 insertions(+), 18 deletions(-) rename public/views/{onboarding => modals}/terms.html (57%) diff --git a/public/views/onboarding/terms.html b/public/views/modals/terms.html similarity index 57% rename from public/views/onboarding/terms.html rename to public/views/modals/terms.html index 61767e604..00f4b896f 100644 --- a/public/views/onboarding/terms.html +++ b/public/views/modals/terms.html @@ -1,21 +1,21 @@ - + {{'Terms of Use' | translate}} - - +
- +

I have read, understood, and agree with the Terms of use.

- +
-
+ diff --git a/public/views/onboarding/disclaimer.html b/public/views/onboarding/disclaimer.html index da93c7b8e..9f48d769c 100644 --- a/public/views/onboarding/disclaimer.html +++ b/public/views/onboarding/disclaimer.html @@ -1,5 +1,5 @@ - +

Almost done! Let's review

@@ -12,9 +12,10 @@ I understand my funds are held securely on this device, not by a company. I understand if this wallet is lost or deleted, my bitcoin can only be recovered with the backup phrase. -
-

I have read, understood, and agree with the Terms of use.

- +
+ +

I have read, understood, and agree with the Terms of use.

+
diff --git a/src/js/controllers/onboarding/disclaimer.js b/src/js/controllers/onboarding/disclaimer.js index 1cd51cc26..ccb64ed82 100644 --- a/src/js/controllers/onboarding/disclaimer.js +++ b/src/js/controllers/onboarding/disclaimer.js @@ -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(); }); }; - });