mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-20 10:55:25 +00:00
fix(addressbook(web)): update card on save when certificate is removed
This commit is contained in:
@@ -575,12 +575,17 @@
|
||||
* @desc Remove any S/MIME certificate associated with the account.
|
||||
* @returns a promise of the HTTP operation
|
||||
*/
|
||||
Card.prototype.$removeCertificate = function() {
|
||||
Card.prototype.$removeCertificate = function(immediate) {
|
||||
var _this = this;
|
||||
|
||||
return Card.$$resource.fetch(this.$path(), 'removeCertificate').then(function() {
|
||||
_this.hasCertificate = false;
|
||||
});
|
||||
if (immediate) {
|
||||
return Card.$$resource.fetch(this.$path(), 'removeCertificate').then(function() {
|
||||
_this.hasCertificate = false;
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.hasCertificate = false;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -79,6 +79,11 @@
|
||||
focus('org_' + i);
|
||||
};
|
||||
|
||||
this.removeCertificate = function (form) {
|
||||
this.card.$removeCertificate();
|
||||
form.$setDirty();
|
||||
};
|
||||
|
||||
this.addBirthday = function () {
|
||||
this.card.birthday = new Date();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user