fix email
This commit is contained in:
parent
279b1c274f
commit
f1576508ba
2 changed files with 7 additions and 5 deletions
|
|
@ -11,7 +11,7 @@
|
|||
<div class="card list">
|
||||
<label class="item item-input item-stacked-label">
|
||||
<span class="input-label" transalate>Email for wallet notifications</span>
|
||||
<input type="email" id="email" name="email" ng-model="email" required></input>
|
||||
<input type="email" id="email" name="email" ng-model="email.value" required></input>
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit"
|
||||
|
|
|
|||
|
|
@ -7,16 +7,18 @@ angular.module('copayApp.controllers').controller('preferencesEmailController',
|
|||
|
||||
var config = configService.getSync();
|
||||
config.emailFor = config.emailFor || {};
|
||||
$scope.email = config.emailFor && config.emailFor[walletId];
|
||||
$scope.email = {
|
||||
value: config.emailFor && config.emailFor[walletId]
|
||||
};
|
||||
|
||||
$scope.save = function(form) {
|
||||
$scope.save = function() {
|
||||
var opts = {
|
||||
emailFor: {}
|
||||
};
|
||||
opts.emailFor[walletId] = $scope.email;
|
||||
opts.emailFor[walletId] = $scope.email.value;
|
||||
|
||||
walletService.updateRemotePreferences(wallet, {
|
||||
email: $scope.email,
|
||||
email: $scope.email.value,
|
||||
}, function(err) {
|
||||
if (err) $log.warn(err);
|
||||
configService.set(opts, function(err) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue