new form for emails
This commit is contained in:
parent
00c730ccc3
commit
bf59f0c94f
2 changed files with 67 additions and 0 deletions
28
src/js/controllers/preferencesEmail.js
Normal file
28
src/js/controllers/preferencesEmail.js
Normal file
|
|
@ -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();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue