From bf59f0c94f5a40c9d61f8360a10f520ad5e7a525 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 14 May 2015 17:21:45 -0300 Subject: [PATCH] new form for emails --- public/views/preferencesEmail.html | 39 ++++++++++++++++++++++++++ src/js/controllers/preferencesEmail.js | 28 ++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 public/views/preferencesEmail.html create mode 100644 src/js/controllers/preferencesEmail.js diff --git a/public/views/preferencesEmail.html b/public/views/preferencesEmail.html new file mode 100644 index 000000000..dac07f5e9 --- /dev/null +++ b/public/views/preferencesEmail.html @@ -0,0 +1,39 @@ +
+
+ + + +
+ +
+
+
+
+
+
+
+
+
+ Saving preferences... +
+
+ + +
+
+ + {{prefEmail.error|translate}} + +
+ + + + +
+

Setting up email notifications could weaken your privacy, if the wallet service provider is compromised. Information available to an attacker would include be the positive confirmation of a bitcoin wallet and its balance, but no more. +

+
diff --git a/src/js/controllers/preferencesEmail.js b/src/js/controllers/preferencesEmail.js new file mode 100644 index 000000000..140c41cd0 --- /dev/null +++ b/src/js/controllers/preferencesEmail.js @@ -0,0 +1,28 @@ +'use strict'; + +angular.module('copayApp.controllers').controller('preferencesEmailController', + function($scope, go, profileService ,gettext, $log) { + this.save = function(form) { + this.error=null; + + if (!form.$valid) { + this.error = gettext('Invalid email'); + return; + } + +console.log('[preferencesEmail.js.12]', this.email); //TODO + var fc = profileService.focusedClient; + this.saving =true; + fc.savePreferences({email:this.email}, function(err) { + fc.saving =false; + if (err) { + $log.warn(err); + $scope.$emit('Local/ClientError', err); + return; + } + go.walletHome(); + }); + }; + + + });