mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-09 18:35:10 +00:00
fix(preferences(js)): set account id before importing certificate
Fixes #5084
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
onSuccessItem: function(item, response, status, headers) {
|
||||
this.clearQueue();
|
||||
$timeout(function() {
|
||||
_.assign(vm.account, {security: {hasCertificate: true}});
|
||||
_.assign(vm.account, {security: {hasCertificate: true}, $$certificate: response});
|
||||
});
|
||||
_loadCertificate();
|
||||
},
|
||||
|
||||
@@ -105,7 +105,9 @@
|
||||
this.addMailAccount = function(ev, form) {
|
||||
var account, index;
|
||||
|
||||
index = this.preferences.defaults.AuxiliaryMailAccounts.length;
|
||||
account = new Account({
|
||||
id: index,
|
||||
isNew: true,
|
||||
name: "",
|
||||
identities: [
|
||||
@@ -121,7 +123,6 @@
|
||||
receiptAnyAction: "ignore"
|
||||
}
|
||||
});
|
||||
index = this.preferences.defaults.AuxiliaryMailAccounts.length;
|
||||
|
||||
$mdDialog.show({
|
||||
controller: 'AccountDialogController',
|
||||
@@ -147,8 +148,10 @@
|
||||
};
|
||||
|
||||
this.editMailAccount = function(event, index, form) {
|
||||
var data = _.cloneDeep(this.preferences.defaults.AuxiliaryMailAccounts[index]);
|
||||
var account = new Account(data);
|
||||
var data, account;
|
||||
|
||||
data = _.assign({ id: index }, _.cloneDeep(this.preferences.defaults.AuxiliaryMailAccounts[index]));
|
||||
account = new Account(data);
|
||||
$mdDialog.show({
|
||||
controller: 'AccountDialogController',
|
||||
controllerAs: '$AccountDialogController',
|
||||
|
||||
Reference in New Issue
Block a user